@walkeros/server-destination-gcp 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +0 -6
- package/dist/index.d.ts +0 -6
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -2,12 +2,6 @@ import { DestinationServer } from '@walkeros/server-core';
|
|
|
2
2
|
import { Mapping as Mapping$1 } from '@walkeros/core';
|
|
3
3
|
import { BigQuery, BigQueryOptions } from '@google-cloud/bigquery';
|
|
4
4
|
|
|
5
|
-
declare global {
|
|
6
|
-
namespace WalkerOS {
|
|
7
|
-
interface Elb extends Elb.RegisterDestination<Destination, Config> {
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
5
|
interface Destination extends DestinationServer.Destination<Settings, Mapping> {
|
|
12
6
|
init: DestinationServer.InitFn<Settings, Mapping>;
|
|
13
7
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,12 +2,6 @@ import { DestinationServer } from '@walkeros/server-core';
|
|
|
2
2
|
import { Mapping as Mapping$1 } from '@walkeros/core';
|
|
3
3
|
import { BigQuery, BigQueryOptions } from '@google-cloud/bigquery';
|
|
4
4
|
|
|
5
|
-
declare global {
|
|
6
|
-
namespace WalkerOS {
|
|
7
|
-
interface Elb extends Elb.RegisterDestination<Destination, Config> {
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
5
|
interface Destination extends DestinationServer.Destination<Settings, Mapping> {
|
|
12
6
|
init: DestinationServer.InitFn<Settings, Mapping>;
|
|
13
7
|
}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,t,r,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,a={};((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})(a,{DestinationBigQuery:()=>y,destinationBigQuery:()=>f}),module.exports=(e=a,((e,t,r,a)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let c of i(t))s.call(e,c)||c===r||n(e,c,{get:()=>t[c],enumerable:!(a=o(t,c))||a.enumerable});return e})(n({},"__esModule",{value:!0}),e));var c=Object.getOwnPropertyNames,l=(t={"package.json"(e,t){t.exports={name:"@walkeros/core",description:"Core types and platform-agnostic utilities for walkerOS",version:"0.1.
|
|
1
|
+
"use strict";var e,t,r,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,a={};((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})(a,{DestinationBigQuery:()=>y,destinationBigQuery:()=>f}),module.exports=(e=a,((e,t,r,a)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let c of i(t))s.call(e,c)||c===r||n(e,c,{get:()=>t[c],enumerable:!(a=o(t,c))||a.enumerable});return e})(n({},"__esModule",{value:!0}),e));var c=Object.getOwnPropertyNames,l=(t={"package.json"(e,t){t.exports={name:"@walkeros/core",description:"Core types and platform-agnostic utilities for walkerOS",version:"0.1.2",main:"./dist/index.js",module:"./dist/index.mjs",types:"./dist/index.d.ts",license:"MIT",files:["dist/**"],scripts:{build:"tsup --silent",clean:"rm -rf .turbo && rm -rf node_modules && rm -rf dist",dev:"jest --watchAll --colors",lint:'tsc && eslint "**/*.ts*"',test:"jest",update:"npx npm-check-updates -u && npm update"},dependencies:{},devDependencies:{},repository:{url:"git+https://github.com/elbwalker/walkerOS.git",directory:"packages/core"},author:"elbwalker <hello@elbwalker.com>",homepage:"https://github.com/elbwalker/walkerOS#readme",bugs:{url:"https://github.com/elbwalker/walkerOS/issues"},keywords:["walker","walkerOS","analytics","tracking","data collection","measurement","data privacy","privacy friendly","web analytics","product analytics","core","types","utils"],funding:[{type:"GitHub Sponsors",url:"https://github.com/sponsors/elbwalker"}]}}},function(){return r||(0,t[c(t)[0]])((r={exports:{}}).exports,r),r.exports});function p(e){return Array.isArray(e)}function d(e){return"object"==typeof e&&null!==e&&!p(e)&&"[object Object]"===Object.prototype.toString.call(e)}var{version:u}=l();var g=require("@google-cloud/bigquery");function b(e={}){const t=e.settings||{},{projectId:r,bigquery:n}=t;let{client:o,location:i,datasetId:s,tableId:a}=t;r||function(e){throw new Error(String(e))}("Config settings projectId missing"),i=i||"EU",s=s||"walkeros",a=a||"events";const c=n||{};c.projectId=r,o=o||new g.BigQuery(c);const l={...t,client:o,projectId:r,location:i,datasetId:s,tableId:a};return{...e,settings:l}}var m=e=>Object.entries(e).reduce((e,[t,r])=>(e[t]=d(r)||p(r)?JSON.stringify(r):r,e),{}),y={},f={type:"gcp-bigquery",config:{},init:async({config:e})=>b(e),push:async(e,{config:t,mapping:r,data:n,collector:o,env:i})=>await async function(e,{config:t,mapping:r,data:n,collector:o,env:i}){const{client:s,datasetId:a,tableId:c}=t.settings;let l;if(d(n))l=n;else{const t=new Date;l={...e,timestamp:e.timestamp?new Date(e.timestamp):t,createdAt:t}}const p=[m(l)];await s.dataset(a).table(c).insert(p)}(e,{config:t,mapping:r,data:n,collector:o,env:i})};//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/bigquery/config.ts","../src/bigquery/push.ts","../src/bigquery/types/index.ts","../src/bigquery/index.ts"],"sourcesContent":["// Google BigQuery\nexport { destinationBigQuery } from './bigquery';\nexport * as DestinationBigQuery from './bigquery/types';\n","import type { Config, PartialConfig, Settings } from './types';\nimport type { BigQueryOptions } from '@google-cloud/bigquery';\nimport { throwError } from '@walkeros/core';\nimport { BigQuery } from '@google-cloud/bigquery';\n\nexport function getConfig(partialConfig: PartialConfig = {}): Config {\n const settings = partialConfig.settings || ({} as Settings);\n const { projectId, bigquery } = settings;\n let { client, location, datasetId, tableId } = settings;\n\n if (!projectId) throwError('Config settings projectId missing');\n\n location = location || 'EU';\n datasetId = datasetId || 'walkeros';\n tableId = tableId || 'events';\n\n const options: BigQueryOptions = bigquery || {};\n options.projectId = projectId;\n\n client = client || new BigQuery(options);\n\n const settingsConfig: Settings = {\n ...settings,\n client,\n projectId,\n location,\n datasetId,\n tableId,\n };\n\n return { ...partialConfig, settings: settingsConfig };\n}\n","import type { WalkerOS } from '@walkeros/core';\nimport type { PushFn } from './types';\nimport { isObject, isArray } from '@walkeros/core';\n\nexport const push: PushFn = async function (\n event,\n { config, mapping: _mapping, data, collector, env },\n) {\n const { client, datasetId, tableId } = config.settings!;\n\n let row: WalkerOS.AnyObject | undefined;\n\n if (isObject(data)) {\n row = data;\n } else {\n const now = new Date();\n row = {\n ...event,\n timestamp: event.timestamp ? new Date(event.timestamp) : now,\n createdAt: now,\n };\n }\n\n const rows = [mapEvent(row)];\n\n await client.dataset(datasetId).table(tableId).insert(rows);\n\n return;\n};\n\nexport const mapEvent = (event: WalkerOS.AnyObject) => {\n return Object.entries(event).reduce<WalkerOS.AnyObject>(\n (acc, [key, value]) => {\n acc[key] =\n isObject(value) || isArray(value) ? JSON.stringify(value) : value;\n return acc;\n },\n {},\n );\n};\n","import type { DestinationServer } from '@walkeros/server-core';\nimport type { Mapping as WalkerOSMapping
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/bigquery/config.ts","../src/bigquery/push.ts","../src/bigquery/types/index.ts","../src/bigquery/index.ts"],"sourcesContent":["// Google BigQuery\nexport { destinationBigQuery } from './bigquery';\nexport * as DestinationBigQuery from './bigquery/types';\n","import type { Config, PartialConfig, Settings } from './types';\nimport type { BigQueryOptions } from '@google-cloud/bigquery';\nimport { throwError } from '@walkeros/core';\nimport { BigQuery } from '@google-cloud/bigquery';\n\nexport function getConfig(partialConfig: PartialConfig = {}): Config {\n const settings = partialConfig.settings || ({} as Settings);\n const { projectId, bigquery } = settings;\n let { client, location, datasetId, tableId } = settings;\n\n if (!projectId) throwError('Config settings projectId missing');\n\n location = location || 'EU';\n datasetId = datasetId || 'walkeros';\n tableId = tableId || 'events';\n\n const options: BigQueryOptions = bigquery || {};\n options.projectId = projectId;\n\n client = client || new BigQuery(options);\n\n const settingsConfig: Settings = {\n ...settings,\n client,\n projectId,\n location,\n datasetId,\n tableId,\n };\n\n return { ...partialConfig, settings: settingsConfig };\n}\n","import type { WalkerOS } from '@walkeros/core';\nimport type { PushFn } from './types';\nimport { isObject, isArray } from '@walkeros/core';\n\nexport const push: PushFn = async function (\n event,\n { config, mapping: _mapping, data, collector, env },\n) {\n const { client, datasetId, tableId } = config.settings!;\n\n let row: WalkerOS.AnyObject | undefined;\n\n if (isObject(data)) {\n row = data;\n } else {\n const now = new Date();\n row = {\n ...event,\n timestamp: event.timestamp ? new Date(event.timestamp) : now,\n createdAt: now,\n };\n }\n\n const rows = [mapEvent(row)];\n\n await client.dataset(datasetId).table(tableId).insert(rows);\n\n return;\n};\n\nexport const mapEvent = (event: WalkerOS.AnyObject) => {\n return Object.entries(event).reduce<WalkerOS.AnyObject>(\n (acc, [key, value]) => {\n acc[key] =\n isObject(value) || isArray(value) ? JSON.stringify(value) : value;\n return acc;\n },\n {},\n );\n};\n","import type { DestinationServer } from '@walkeros/server-core';\nimport type { Mapping as WalkerOSMapping } from '@walkeros/core';\nimport type { BigQuery, BigQueryOptions } from '@google-cloud/bigquery';\n\nexport interface Destination\n extends DestinationServer.Destination<Settings, Mapping> {\n init: DestinationServer.InitFn<Settings, Mapping>;\n}\n\nexport type Config = {\n settings: Settings;\n} & DestinationServer.Config<Settings, Mapping>;\n\nexport interface Settings {\n client: BigQuery;\n projectId: string;\n datasetId: string;\n tableId: string;\n location?: string;\n bigquery?: BigQueryOptions;\n}\n\nexport interface Mapping {\n // Custom destination event mapping properties\n}\n\nexport type InitFn = DestinationServer.InitFn<Settings, Mapping>;\nexport type PushFn = DestinationServer.PushFn<Settings, Mapping>;\n\nexport type PartialConfig = DestinationServer.PartialConfig<Settings, Mapping>;\n\nexport type PushEvents = DestinationServer.PushEvents<Mapping>;\n\nexport type Rule = WalkerOSMapping.Rule<Mapping>;\nexport type Rules = WalkerOSMapping.Rules<Rule>;\n","import type { Destination } from './types';\nimport { getConfig } from './config';\nimport { push } from './push';\n\n// Types\nexport * as DestinationBigQuery from './types';\n\nexport const destinationBigQuery: Destination = {\n type: 'gcp-bigquery',\n\n config: {},\n\n async init({ config: partialConfig }) {\n const config = getConfig(partialConfig);\n\n return config;\n },\n\n async push(event, { config, mapping, data, collector, env }) {\n return await push(event, { config, mapping, data, collector, env });\n },\n};\n\nexport default destinationBigQuery;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A;;;;;;;;;;;;;;;;;;;;;;ACGA,sBAAyB;AAElB,SAAS,UAAU,gBAA+B,CAAC,GAAW;AACnE,QAAM,WAAW,cAAc,YAAa,CAAC;AAC7C,QAAM,EAAE,WAAW,SAAS,IAAI;AAChC,MAAI,EAAE,QAAQ,UAAU,WAAW,QAAQ,IAAI;AAE/C,MAAI,CAAC,UAAW,IAAW,mCAAmC;AAE9D,aAAW,YAAY;AACvB,cAAY,aAAa;AACzB,YAAU,WAAW;AAErB,QAAM,UAA2B,YAAY,CAAC;AAC9C,UAAQ,YAAY;AAEpB,WAAS,UAAU,IAAI,yBAAS,OAAO;AAEvC,QAAM,iBAA2B;AAAA,IAC/B,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,SAAO,EAAE,GAAG,eAAe,UAAU,eAAe;AACtD;;;AC3BO,IAAM,OAAe,eAC1B,OACA,EAAE,QAAQ,SAAS,UAAU,MAAM,WAAW,IAAI,GAClD;AACA,QAAM,EAAE,QAAQ,WAAW,QAAQ,IAAI,OAAO;AAE9C,MAAI;AAEJ,MAAI,EAAS,IAAI,GAAG;AAClB,UAAM;AAAA,EACR,OAAO;AACL,UAAM,MAAM,oBAAI,KAAK;AACrB,UAAM;AAAA,MACJ,GAAG;AAAA,MACH,WAAW,MAAM,YAAY,IAAI,KAAK,MAAM,SAAS,IAAI;AAAA,MACzD,WAAW;AAAA,IACb;AAAA,EACF;AAEA,QAAM,OAAO,CAAC,SAAS,GAAG,CAAC;AAE3B,QAAM,OAAO,QAAQ,SAAS,EAAE,MAAM,OAAO,EAAE,OAAO,IAAI;AAE1D;AACF;AAEO,IAAM,WAAW,CAAC,UAA8B;AACrD,SAAO,OAAO,QAAQ,KAAK,EAAE;AAAA,IAC3B,CAAC,KAAK,CAAC,KAAK,KAAK,MAAM;AACrB,UAAI,GAAG,IACL,EAAS,KAAK,KAAK,EAAQ,KAAK,IAAI,KAAK,UAAU,KAAK,IAAI;AAC9D,aAAO;AAAA,IACT;AAAA,IACA,CAAC;AAAA,EACH;AACF;;;ACvCA;;;ACOO,IAAM,sBAAmC;AAAA,EAC9C,MAAM;AAAA,EAEN,QAAQ,CAAC;AAAA,EAET,MAAM,KAAK,EAAE,QAAQ,cAAc,GAAG;AACpC,UAAM,SAAS,UAAU,aAAa;AAEtC,WAAO;AAAA,EACT;AAAA,EAEA,MAAM,KAAK,OAAO,EAAE,QAAQ,SAAS,MAAM,WAAW,IAAI,GAAG;AAC3D,WAAO,MAAM,KAAK,OAAO,EAAE,QAAQ,SAAS,MAAM,WAAW,IAAI,CAAC;AAAA,EACpE;AACF;","names":[]}
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e,t,n=Object.getOwnPropertyNames,r=(e={"package.json"(e,t){t.exports={name:"@walkeros/core",description:"Core types and platform-agnostic utilities for walkerOS",version:"0.1.
|
|
1
|
+
var e,t,n=Object.getOwnPropertyNames,r=(e={"package.json"(e,t){t.exports={name:"@walkeros/core",description:"Core types and platform-agnostic utilities for walkerOS",version:"0.1.2",main:"./dist/index.js",module:"./dist/index.mjs",types:"./dist/index.d.ts",license:"MIT",files:["dist/**"],scripts:{build:"tsup --silent",clean:"rm -rf .turbo && rm -rf node_modules && rm -rf dist",dev:"jest --watchAll --colors",lint:'tsc && eslint "**/*.ts*"',test:"jest",update:"npx npm-check-updates -u && npm update"},dependencies:{},devDependencies:{},repository:{url:"git+https://github.com/elbwalker/walkerOS.git",directory:"packages/core"},author:"elbwalker <hello@elbwalker.com>",homepage:"https://github.com/elbwalker/walkerOS#readme",bugs:{url:"https://github.com/elbwalker/walkerOS/issues"},keywords:["walker","walkerOS","analytics","tracking","data collection","measurement","data privacy","privacy friendly","web analytics","product analytics","core","types","utils"],funding:[{type:"GitHub Sponsors",url:"https://github.com/sponsors/elbwalker"}]}}},function(){return t||(0,e[n(e)[0]])((t={exports:{}}).exports,t),t.exports});function s(e){return Array.isArray(e)}function i(e){return"object"==typeof e&&null!==e&&!s(e)&&"[object Object]"===Object.prototype.toString.call(e)}var{version:a}=r();import{BigQuery as o}from"@google-cloud/bigquery";function c(e={}){const t=e.settings||{},{projectId:n,bigquery:r}=t;let{client:s,location:i,datasetId:a,tableId:c}=t;n||function(e){throw new Error(String(e))}("Config settings projectId missing"),i=i||"EU",a=a||"walkeros",c=c||"events";const l=r||{};l.projectId=n,s=s||new o(l);const p={...t,client:s,projectId:n,location:i,datasetId:a,tableId:c};return{...e,settings:p}}var l=e=>Object.entries(e).reduce((e,[t,n])=>(e[t]=i(n)||s(n)?JSON.stringify(n):n,e),{}),p={},d={type:"gcp-bigquery",config:{},init:async({config:e})=>c(e),push:async(e,{config:t,mapping:n,data:r,collector:s,env:a})=>await async function(e,{config:t,mapping:n,data:r,collector:s,env:a}){const{client:o,datasetId:c,tableId:p}=t.settings;let d;if(i(r))d=r;else{const t=new Date;d={...e,timestamp:e.timestamp?new Date(e.timestamp):t,createdAt:t}}const u=[l(d)];await o.dataset(c).table(p).insert(u)}(e,{config:t,mapping:n,data:r,collector:s,env:a})};export{p as DestinationBigQuery,d as destinationBigQuery};//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/bigquery/config.ts","../src/bigquery/push.ts","../src/bigquery/types/index.ts","../src/bigquery/index.ts"],"sourcesContent":["import type { Config, PartialConfig, Settings } from './types';\nimport type { BigQueryOptions } from '@google-cloud/bigquery';\nimport { throwError } from '@walkeros/core';\nimport { BigQuery } from '@google-cloud/bigquery';\n\nexport function getConfig(partialConfig: PartialConfig = {}): Config {\n const settings = partialConfig.settings || ({} as Settings);\n const { projectId, bigquery } = settings;\n let { client, location, datasetId, tableId } = settings;\n\n if (!projectId) throwError('Config settings projectId missing');\n\n location = location || 'EU';\n datasetId = datasetId || 'walkeros';\n tableId = tableId || 'events';\n\n const options: BigQueryOptions = bigquery || {};\n options.projectId = projectId;\n\n client = client || new BigQuery(options);\n\n const settingsConfig: Settings = {\n ...settings,\n client,\n projectId,\n location,\n datasetId,\n tableId,\n };\n\n return { ...partialConfig, settings: settingsConfig };\n}\n","import type { WalkerOS } from '@walkeros/core';\nimport type { PushFn } from './types';\nimport { isObject, isArray } from '@walkeros/core';\n\nexport const push: PushFn = async function (\n event,\n { config, mapping: _mapping, data, collector, env },\n) {\n const { client, datasetId, tableId } = config.settings!;\n\n let row: WalkerOS.AnyObject | undefined;\n\n if (isObject(data)) {\n row = data;\n } else {\n const now = new Date();\n row = {\n ...event,\n timestamp: event.timestamp ? new Date(event.timestamp) : now,\n createdAt: now,\n };\n }\n\n const rows = [mapEvent(row)];\n\n await client.dataset(datasetId).table(tableId).insert(rows);\n\n return;\n};\n\nexport const mapEvent = (event: WalkerOS.AnyObject) => {\n return Object.entries(event).reduce<WalkerOS.AnyObject>(\n (acc, [key, value]) => {\n acc[key] =\n isObject(value) || isArray(value) ? JSON.stringify(value) : value;\n return acc;\n },\n {},\n );\n};\n","import type { DestinationServer } from '@walkeros/server-core';\nimport type { Mapping as WalkerOSMapping
|
|
1
|
+
{"version":3,"sources":["../src/bigquery/config.ts","../src/bigquery/push.ts","../src/bigquery/types/index.ts","../src/bigquery/index.ts"],"sourcesContent":["import type { Config, PartialConfig, Settings } from './types';\nimport type { BigQueryOptions } from '@google-cloud/bigquery';\nimport { throwError } from '@walkeros/core';\nimport { BigQuery } from '@google-cloud/bigquery';\n\nexport function getConfig(partialConfig: PartialConfig = {}): Config {\n const settings = partialConfig.settings || ({} as Settings);\n const { projectId, bigquery } = settings;\n let { client, location, datasetId, tableId } = settings;\n\n if (!projectId) throwError('Config settings projectId missing');\n\n location = location || 'EU';\n datasetId = datasetId || 'walkeros';\n tableId = tableId || 'events';\n\n const options: BigQueryOptions = bigquery || {};\n options.projectId = projectId;\n\n client = client || new BigQuery(options);\n\n const settingsConfig: Settings = {\n ...settings,\n client,\n projectId,\n location,\n datasetId,\n tableId,\n };\n\n return { ...partialConfig, settings: settingsConfig };\n}\n","import type { WalkerOS } from '@walkeros/core';\nimport type { PushFn } from './types';\nimport { isObject, isArray } from '@walkeros/core';\n\nexport const push: PushFn = async function (\n event,\n { config, mapping: _mapping, data, collector, env },\n) {\n const { client, datasetId, tableId } = config.settings!;\n\n let row: WalkerOS.AnyObject | undefined;\n\n if (isObject(data)) {\n row = data;\n } else {\n const now = new Date();\n row = {\n ...event,\n timestamp: event.timestamp ? new Date(event.timestamp) : now,\n createdAt: now,\n };\n }\n\n const rows = [mapEvent(row)];\n\n await client.dataset(datasetId).table(tableId).insert(rows);\n\n return;\n};\n\nexport const mapEvent = (event: WalkerOS.AnyObject) => {\n return Object.entries(event).reduce<WalkerOS.AnyObject>(\n (acc, [key, value]) => {\n acc[key] =\n isObject(value) || isArray(value) ? JSON.stringify(value) : value;\n return acc;\n },\n {},\n );\n};\n","import type { DestinationServer } from '@walkeros/server-core';\nimport type { Mapping as WalkerOSMapping } from '@walkeros/core';\nimport type { BigQuery, BigQueryOptions } from '@google-cloud/bigquery';\n\nexport interface Destination\n extends DestinationServer.Destination<Settings, Mapping> {\n init: DestinationServer.InitFn<Settings, Mapping>;\n}\n\nexport type Config = {\n settings: Settings;\n} & DestinationServer.Config<Settings, Mapping>;\n\nexport interface Settings {\n client: BigQuery;\n projectId: string;\n datasetId: string;\n tableId: string;\n location?: string;\n bigquery?: BigQueryOptions;\n}\n\nexport interface Mapping {\n // Custom destination event mapping properties\n}\n\nexport type InitFn = DestinationServer.InitFn<Settings, Mapping>;\nexport type PushFn = DestinationServer.PushFn<Settings, Mapping>;\n\nexport type PartialConfig = DestinationServer.PartialConfig<Settings, Mapping>;\n\nexport type PushEvents = DestinationServer.PushEvents<Mapping>;\n\nexport type Rule = WalkerOSMapping.Rule<Mapping>;\nexport type Rules = WalkerOSMapping.Rules<Rule>;\n","import type { Destination } from './types';\nimport { getConfig } from './config';\nimport { push } from './push';\n\n// Types\nexport * as DestinationBigQuery from './types';\n\nexport const destinationBigQuery: Destination = {\n type: 'gcp-bigquery',\n\n config: {},\n\n async init({ config: partialConfig }) {\n const config = getConfig(partialConfig);\n\n return config;\n },\n\n async push(event, { config, mapping, data, collector, env }) {\n return await push(event, { config, mapping, data, collector, env });\n },\n};\n\nexport default destinationBigQuery;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAGA,SAAS,gBAAgB;AAElB,SAAS,UAAU,gBAA+B,CAAC,GAAW;AACnE,QAAM,WAAW,cAAc,YAAa,CAAC;AAC7C,QAAM,EAAE,WAAW,SAAS,IAAI;AAChC,MAAI,EAAE,QAAQ,UAAU,WAAW,QAAQ,IAAI;AAE/C,MAAI,CAAC,UAAW,IAAW,mCAAmC;AAE9D,aAAW,YAAY;AACvB,cAAY,aAAa;AACzB,YAAU,WAAW;AAErB,QAAM,UAA2B,YAAY,CAAC;AAC9C,UAAQ,YAAY;AAEpB,WAAS,UAAU,IAAI,SAAS,OAAO;AAEvC,QAAM,iBAA2B;AAAA,IAC/B,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,SAAO,EAAE,GAAG,eAAe,UAAU,eAAe;AACtD;;;AC3BO,IAAM,OAAe,eAC1B,OACA,EAAE,QAAQ,SAAS,UAAU,MAAM,WAAW,IAAI,GAClD;AACA,QAAM,EAAE,QAAQ,WAAW,QAAQ,IAAI,OAAO;AAE9C,MAAI;AAEJ,MAAI,EAAS,IAAI,GAAG;AAClB,UAAM;AAAA,EACR,OAAO;AACL,UAAM,MAAM,oBAAI,KAAK;AACrB,UAAM;AAAA,MACJ,GAAG;AAAA,MACH,WAAW,MAAM,YAAY,IAAI,KAAK,MAAM,SAAS,IAAI;AAAA,MACzD,WAAW;AAAA,IACb;AAAA,EACF;AAEA,QAAM,OAAO,CAAC,SAAS,GAAG,CAAC;AAE3B,QAAM,OAAO,QAAQ,SAAS,EAAE,MAAM,OAAO,EAAE,OAAO,IAAI;AAE1D;AACF;AAEO,IAAM,WAAW,CAAC,UAA8B;AACrD,SAAO,OAAO,QAAQ,KAAK,EAAE;AAAA,IAC3B,CAAC,KAAK,CAAC,KAAK,KAAK,MAAM;AACrB,UAAI,GAAG,IACL,EAAS,KAAK,KAAK,EAAQ,KAAK,IAAI,KAAK,UAAU,KAAK,IAAI;AAC9D,aAAO;AAAA,IACT;AAAA,IACA,CAAC;AAAA,EACH;AACF;;;ACvCA;;;ACOO,IAAM,sBAAmC;AAAA,EAC9C,MAAM;AAAA,EAEN,QAAQ,CAAC;AAAA,EAET,MAAM,KAAK,EAAE,QAAQ,cAAc,GAAG;AACpC,UAAM,SAAS,UAAU,aAAa;AAEtC,WAAO;AAAA,EACT;AAAA,EAEA,MAAM,KAAK,OAAO,EAAE,QAAQ,SAAS,MAAM,WAAW,IAAI,GAAG;AAC3D,WAAO,MAAM,KAAK,OAAO,EAAE,QAAQ,SAAS,MAAM,WAAW,IAAI,CAAC;AAAA,EACpE;AACF;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@walkeros/server-destination-gcp",
|
|
3
3
|
"description": "Google Cloud Platform server destination for walkerOS (BigQuery)",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.mjs",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@google-cloud/bigquery": "^7.8.0",
|
|
22
|
-
"@walkeros/server-core": "0.1.
|
|
22
|
+
"@walkeros/server-core": "0.1.2"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {},
|
|
25
25
|
"repository": {
|