Socket
Socket
Sign inDemoInstall

@cubejs-client/core

Package Overview
Dependencies
Maintainers
3
Versions
226
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cubejs-client/core - npm Package Compare versions

Comparing version 0.34.60 to 0.35.0

6

dist/cubejs-client-core.esm.js

@@ -1277,3 +1277,3 @@ import { v4 } from 'uuid';

class CubejsApi {
class CubeApi {
constructor(apiToken, options) {

@@ -1608,6 +1608,6 @@ if (apiToken !== null && !Array.isArray(apiToken) && typeof apiToken === 'object') {

var index = ((apiToken, options) => new CubejsApi(apiToken, options));
var index = ((apiToken, options) => new CubeApi(apiToken, options));
export default index;
export { CubejsApi as CubeApi, CubejsApi, DEFAULT_GRANULARITY, GRANULARITIES, HttpTransport, Meta, RequestError, ResultSet, aliasSeries, areQueriesEqual, defaultHeuristics, defaultOrder, flattenFilters, getOrderMembersFromOrder, getQueryMembers, isQueryPresent, moveItemInArray, movePivotItem, removeEmptyQueryFields, validateQuery };
export { CubeApi, DEFAULT_GRANULARITY, GRANULARITIES, HttpTransport, Meta, RequestError, ResultSet, aliasSeries, areQueriesEqual, defaultHeuristics, defaultOrder, flattenFilters, getOrderMembersFromOrder, getQueryMembers, isQueryPresent, moveItemInArray, movePivotItem, removeEmptyQueryFields, validateQuery };
//# sourceMappingURL=cubejs-client-core.esm.js.map

@@ -69,3 +69,3 @@ /**

export type CubeJSApiOptions = {
export type CubeApiOptions = {
/**

@@ -102,3 +102,3 @@ * URL of your Cube.js Backend. By default, in the development environment it is `http://localhost:4000/cubejs-api/v1`

*/
cubejsApi?: CubejsApi;
cubeApi?: CubeApi;
/**

@@ -329,3 +329,3 @@ * If enabled, all members of the 'number' type will be automatically converted to numerical values on the client side

*
* const resultSet = await cubejsApi.load(query);
* const resultSet = await cubeApi.load(query);
* // You can store the result somewhere

@@ -1078,7 +1078,7 @@ * const tmp = resultSet.serialize();

/**
* Main class for accessing Cube.js API
* Main class for accessing Cube API
*
* @order 2
*/
export class CubejsApi {
export class CubeApi {
load<QueryType extends DeeplyReadonly<Query | Query[]>>(

@@ -1092,9 +1092,9 @@ query: QueryType,

* ```js
* import cubejs from '@cubejs-client/core';
* import cube from '@cubejs-client/core';
* import Chart from 'chart.js';
* import chartjsConfig from './toChartjsData';
*
* const cubejsApi = cubejs('CUBEJS_TOKEN');
* const cubeApi = cube('CUBEJS_TOKEN');
*
* const resultSet = await cubejsApi.load({
* const resultSet = await cubeApi.load({
* measures: ['Stories.count'],

@@ -1131,3 +1131,3 @@ * timeDimensions: [{

* // Subscribe to a query's updates
* const subscription = await cubejsApi.subscribe(
* const subscription = await cubeApi.subscribe(
* {

@@ -1182,8 +1182,8 @@ * measures: ['Logs.count'],

/**
* Creates an instance of the `CubejsApi`. The API entry point.
* Creates an instance of the `CubeApi`. The API entry point.
*
* ```js
* import cubejs from '@cubejs-client/core';
* const cubejsApi = cubejs(
* 'CUBEJS-API-TOKEN',
* import cube from '@cubejs-client/core';
* const cubeApi = cube(
* 'CUBE-API-TOKEN',
* { apiUrl: 'http://localhost:4000/cubejs-api/v1' }

@@ -1196,4 +1196,4 @@ * );

* ```js
* import cubejs from '@cubejs-client/core';
* const cubejsApi = cubejs(
* import cube from '@cubejs-client/core';
* const cubeApi = cube(
* async () => await Auth.getJwtToken(),

@@ -1207,4 +1207,4 @@ * { apiUrl: 'http://localhost:4000/cubejs-api/v1' }

*/
export default function cubejs(apiToken: string | (() => Promise<string>), options: CubeJSApiOptions): CubejsApi;
export default function cubejs(options: CubeJSApiOptions): CubejsApi;
export default function cube(apiToken: string | (() => Promise<string>), options: CubeApiOptions): CubeApi;
export default function cube(options: CubeApiOptions): CubeApi;

@@ -1211,0 +1211,0 @@ /**

{
"name": "@cubejs-client/core",
"version": "0.34.60",
"version": "0.35.0",
"engines": {},

@@ -48,3 +48,3 @@ "repository": {

},
"gitHead": "7434929be3e99eb1d1fbb8a6b6c7f2427c6fcae6"
"gitHead": "75bc6c3d96392b7823e714d17ac85ab435e55b05"
}

@@ -33,3 +33,3 @@ import { v4 as uuidv4 } from 'uuid';

class CubejsApi {
class CubeApi {
constructor(apiToken, options) {

@@ -377,5 +377,5 @@ if (apiToken !== null && !Array.isArray(apiToken) && typeof apiToken === 'object') {

export default (apiToken, options) => new CubejsApi(apiToken, options);
export default (apiToken, options) => new CubeApi(apiToken, options);
export { CubejsApi, CubejsApi as CubeApi, HttpTransport, ResultSet, RequestError, Meta };
export { CubeApi, HttpTransport, ResultSet, RequestError, Meta };
export * from './utils';
/**
* @license Apache-2.0
* @copyright Cube Dev, Inc.
* @fileoverview CubejsApi class unit tests.
* @fileoverview CubeApi class unit tests.
*/

@@ -10,3 +10,3 @@

import ResultSet from './ResultSet';
import { CubejsApi } from './index';
import { CubeApi } from './index';

@@ -207,5 +207,5 @@ jest.mock('./ResultSet');

describe('CubejsApi', () => {
test('CubejsApi#loadResponseInternal should work with the "default" resType for regular query', () => {
const api = new CubejsApi(undefined, {
describe('CubeApi', () => {
test('CubeApi#loadResponseInternal should work with the "default" resType for regular query', () => {
const api = new CubeApi(undefined, {
apiUrl: 'http://localhost:4000/cubejs-api/v1',

@@ -241,4 +241,4 @@ });

test('CubejsApi#loadResponseInternal should work with the "default" resType for compare date range query', () => {
const api = new CubejsApi(undefined, {
test('CubeApi#loadResponseInternal should work with the "default" resType for compare date range query', () => {
const api = new CubeApi(undefined, {
apiUrl: 'http://localhost:4000/cubejs-api/v1',

@@ -288,4 +288,4 @@ });

test('CubejsApi#loadResponseInternal should work with the "default" resType for blending query', () => {
const api = new CubejsApi(undefined, {
test('CubeApi#loadResponseInternal should work with the "default" resType for blending query', () => {
const api = new CubeApi(undefined, {
apiUrl: 'http://localhost:4000/cubejs-api/v1',

@@ -335,4 +335,4 @@ });

test('CubejsApi#loadResponseInternal should work with the "compact" resType for regular query', () => {
const api = new CubejsApi(undefined, {
test('CubeApi#loadResponseInternal should work with the "compact" resType for regular query', () => {
const api = new CubeApi(undefined, {
apiUrl: 'http://localhost:4000/cubejs-api/v1',

@@ -368,4 +368,4 @@ });

test('CubejsApi#loadResponseInternal should work with the "compact" resType for compare date range query', () => {
const api = new CubejsApi(undefined, {
test('CubeApi#loadResponseInternal should work with the "compact" resType for compare date range query', () => {
const api = new CubeApi(undefined, {
apiUrl: 'http://localhost:4000/cubejs-api/v1',

@@ -415,4 +415,4 @@ });

test('CubejsApi#loadResponseInternal should work with the "compact" resType for blending query', () => {
const api = new CubejsApi(undefined, {
test('CubeApi#loadResponseInternal should work with the "compact" resType for blending query', () => {
const api = new CubeApi(undefined, {
apiUrl: 'http://localhost:4000/cubejs-api/v1',

@@ -419,0 +419,0 @@ });

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

import cubejs from './index';
import cube from './index';
import * as clientCoreExports from './index';
Object.keys(clientCoreExports).forEach((key) => {
cubejs[key] = clientCoreExports[key];
cube[key] = clientCoreExports[key];
});
export default cubejs;
export default cube;

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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