@walkeros/server-core 0.0.7

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/README.md ADDED
@@ -0,0 +1,82 @@
1
+ <p align="left">
2
+ <a href="https://elbwalker.com">
3
+ <img title="elbwalker" src='https://www.elbwalker.com/img/elbwalker_logo.png' width="256px"/>
4
+ </a>
5
+ </p>
6
+
7
+ # Server Core Utilities for walkerOS
8
+
9
+ The walkerOS Server Core package provides server-specific utilities and
10
+ functions that power server-side data collection. It extends the
11
+ platform-agnostic Core package with Node.js-specific functionality for server
12
+ environment detection, request handling, and server-side event processing.
13
+
14
+ ## Role in walkerOS Ecosystem
15
+
16
+ walkerOS follows a **source → collector → destination** architecture:
17
+
18
+ - **Sources**: Capture events from various environments (browser DOM, dataLayer,
19
+ server requests)
20
+ - **Collector**: Processes, validates, and routes events with consent awareness
21
+ - **Destinations**: Send processed events to analytics platforms (GA4, Meta,
22
+ custom APIs)
23
+
24
+ The Server Core package serves as the foundation for all server-based sources
25
+ and destinations, providing essential Node.js utilities, request handling, and
26
+ server-specific event processing capabilities.
27
+
28
+ ## Installation
29
+
30
+ ```sh
31
+ npm install @walkeros/server-core
32
+ ```
33
+
34
+ ## Usage
35
+
36
+ The server core package provides Node.js-specific utilities:
37
+
38
+ ```typescript
39
+ import {
40
+ // Server utilities
41
+ getHashServer,
42
+ sendServer,
43
+
44
+ // Type definitions
45
+ ServerDestination,
46
+ } from '@walkeros/server-core';
47
+
48
+ // Example: Generate server-side hash
49
+ const hash = await getHashServer('user-id', 'additional-data');
50
+ console.log('Generated hash:', hash);
51
+
52
+ // Example: Send event from server
53
+ await sendServer({
54
+ event: 'order complete',
55
+ data: { orderId: '12345', profit: 42 },
56
+ // ... other event properties
57
+ });
58
+ ```
59
+
60
+ ## Core Features
61
+
62
+ - **Server Environment Detection**: Identify Node.js version and server
63
+ capabilities
64
+ - **Request Processing**: Handle incoming HTTP requests and extract event data
65
+ - **Server-Side Hashing**: Generate consistent identifiers in server
66
+ environments
67
+ - **Event Transmission**: Server-optimized event sending mechanisms
68
+ - **Server Destinations**: Base classes and utilities for server-side
69
+ destinations
70
+ - **Performance Optimization**: Memory-efficient processing for high-throughput
71
+ scenarios
72
+
73
+ ## Contribute
74
+
75
+ Feel free to contribute by submitting an
76
+ [issue](https://github.com/elbwalker/walkerOS/issues), starting a
77
+ [discussion](https://github.com/elbwalker/walkerOS/discussions), or getting in
78
+ [contact](https://calendly.com/elb-alexander/30min).
79
+
80
+ ## License
81
+
82
+ This project is licensed under the MIT License.
@@ -0,0 +1,53 @@
1
+ import { SendHeaders, SendDataValue, SendResponse, Destination as Destination$1, Elb } from '@walkeros/core';
2
+
3
+ interface SendServerOptions {
4
+ headers?: SendHeaders;
5
+ method?: string;
6
+ timeout?: number;
7
+ }
8
+ declare function sendServer(url: string, data?: SendDataValue, options?: SendServerOptions): Promise<SendResponse>;
9
+
10
+ declare function getHashServer(str: string, length?: number): Promise<string>;
11
+
12
+ interface Destination<Settings = unknown, Mapping = unknown> extends Destination$1.Instance<Settings, Mapping> {
13
+ }
14
+ type Init = Destination$1.Init;
15
+ type Config<Settings = unknown, Mapping = unknown> = Destination$1.Config<Settings, Mapping>;
16
+ type PartialConfig<Settings = unknown, Mapping = unknown> = Destination$1.PartialConfig<Settings, Mapping>;
17
+ type InitFn<Settings = unknown, Mapping = unknown> = Destination$1.InitFn<Settings, Mapping>;
18
+ type PushFn<Settings = unknown, Mapping = unknown> = Destination$1.PushFn<Settings, Mapping>;
19
+ type PushEvent<Mapping = unknown> = Destination$1.PushEvent<Mapping>;
20
+ type PushEvents<Mapping = unknown> = Destination$1.PushEvents<Mapping>;
21
+
22
+ type destination_Config<Settings = unknown, Mapping = unknown> = Config<Settings, Mapping>;
23
+ type destination_Destination<Settings = unknown, Mapping = unknown> = Destination<Settings, Mapping>;
24
+ type destination_Init = Init;
25
+ type destination_InitFn<Settings = unknown, Mapping = unknown> = InitFn<Settings, Mapping>;
26
+ type destination_PartialConfig<Settings = unknown, Mapping = unknown> = PartialConfig<Settings, Mapping>;
27
+ type destination_PushEvent<Mapping = unknown> = PushEvent<Mapping>;
28
+ type destination_PushEvents<Mapping = unknown> = PushEvents<Mapping>;
29
+ type destination_PushFn<Settings = unknown, Mapping = unknown> = PushFn<Settings, Mapping>;
30
+ declare namespace destination {
31
+ export type { destination_Config as Config, destination_Destination as Destination, destination_Init as Init, destination_InitFn as InitFn, destination_PartialConfig as PartialConfig, destination_PushEvent as PushEvent, destination_PushEvents as PushEvents, destination_PushFn as PushFn };
32
+ }
33
+
34
+ type Fn<R = Return> = Elb.Fn<R> & CommandDestination<R> & CommandRun<R>;
35
+ type CommandDestination<R = void> = (event: 'walker destination', destination: Destination | Init, config?: Config) => R;
36
+ type CommandRun<R = void> = (event: 'walker run') => R;
37
+ type PushData = Elb.PushData | Destination | Init;
38
+ type PushOptions = Config;
39
+ type PushResult = Elb.PushResult;
40
+ type Return<R = Promise<PushResult>> = R;
41
+
42
+ type elb_CommandDestination<R = void> = CommandDestination<R>;
43
+ type elb_CommandRun<R = void> = CommandRun<R>;
44
+ type elb_Fn<R = Return> = Fn<R>;
45
+ type elb_PushData = PushData;
46
+ type elb_PushOptions = PushOptions;
47
+ type elb_PushResult = PushResult;
48
+ type elb_Return<R = Promise<PushResult>> = Return<R>;
49
+ declare namespace elb {
50
+ export type { elb_CommandDestination as CommandDestination, elb_CommandRun as CommandRun, elb_Fn as Fn, elb_PushData as PushData, elb_PushOptions as PushOptions, elb_PushResult as PushResult, elb_Return as Return };
51
+ }
52
+
53
+ export { destination as DestinationServer, elb as Elb, type SendServerOptions, getHashServer, sendServer };
@@ -0,0 +1,53 @@
1
+ import { SendHeaders, SendDataValue, SendResponse, Destination as Destination$1, Elb } from '@walkeros/core';
2
+
3
+ interface SendServerOptions {
4
+ headers?: SendHeaders;
5
+ method?: string;
6
+ timeout?: number;
7
+ }
8
+ declare function sendServer(url: string, data?: SendDataValue, options?: SendServerOptions): Promise<SendResponse>;
9
+
10
+ declare function getHashServer(str: string, length?: number): Promise<string>;
11
+
12
+ interface Destination<Settings = unknown, Mapping = unknown> extends Destination$1.Instance<Settings, Mapping> {
13
+ }
14
+ type Init = Destination$1.Init;
15
+ type Config<Settings = unknown, Mapping = unknown> = Destination$1.Config<Settings, Mapping>;
16
+ type PartialConfig<Settings = unknown, Mapping = unknown> = Destination$1.PartialConfig<Settings, Mapping>;
17
+ type InitFn<Settings = unknown, Mapping = unknown> = Destination$1.InitFn<Settings, Mapping>;
18
+ type PushFn<Settings = unknown, Mapping = unknown> = Destination$1.PushFn<Settings, Mapping>;
19
+ type PushEvent<Mapping = unknown> = Destination$1.PushEvent<Mapping>;
20
+ type PushEvents<Mapping = unknown> = Destination$1.PushEvents<Mapping>;
21
+
22
+ type destination_Config<Settings = unknown, Mapping = unknown> = Config<Settings, Mapping>;
23
+ type destination_Destination<Settings = unknown, Mapping = unknown> = Destination<Settings, Mapping>;
24
+ type destination_Init = Init;
25
+ type destination_InitFn<Settings = unknown, Mapping = unknown> = InitFn<Settings, Mapping>;
26
+ type destination_PartialConfig<Settings = unknown, Mapping = unknown> = PartialConfig<Settings, Mapping>;
27
+ type destination_PushEvent<Mapping = unknown> = PushEvent<Mapping>;
28
+ type destination_PushEvents<Mapping = unknown> = PushEvents<Mapping>;
29
+ type destination_PushFn<Settings = unknown, Mapping = unknown> = PushFn<Settings, Mapping>;
30
+ declare namespace destination {
31
+ export type { destination_Config as Config, destination_Destination as Destination, destination_Init as Init, destination_InitFn as InitFn, destination_PartialConfig as PartialConfig, destination_PushEvent as PushEvent, destination_PushEvents as PushEvents, destination_PushFn as PushFn };
32
+ }
33
+
34
+ type Fn<R = Return> = Elb.Fn<R> & CommandDestination<R> & CommandRun<R>;
35
+ type CommandDestination<R = void> = (event: 'walker destination', destination: Destination | Init, config?: Config) => R;
36
+ type CommandRun<R = void> = (event: 'walker run') => R;
37
+ type PushData = Elb.PushData | Destination | Init;
38
+ type PushOptions = Config;
39
+ type PushResult = Elb.PushResult;
40
+ type Return<R = Promise<PushResult>> = R;
41
+
42
+ type elb_CommandDestination<R = void> = CommandDestination<R>;
43
+ type elb_CommandRun<R = void> = CommandRun<R>;
44
+ type elb_Fn<R = Return> = Fn<R>;
45
+ type elb_PushData = PushData;
46
+ type elb_PushOptions = PushOptions;
47
+ type elb_PushResult = PushResult;
48
+ type elb_Return<R = Promise<PushResult>> = Return<R>;
49
+ declare namespace elb {
50
+ export type { elb_CommandDestination as CommandDestination, elb_CommandRun as CommandRun, elb_Fn as Fn, elb_PushData as PushData, elb_PushOptions as PushOptions, elb_PushResult as PushResult, elb_Return as Return };
51
+ }
52
+
53
+ export { destination as DestinationServer, elb as Elb, type SendServerOptions, getHashServer, sendServer };
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";var e,t=Object.create,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,a=Object.getPrototypeOf,n=Object.prototype.hasOwnProperty,u=(e,t,a,u)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let c of s(t))n.call(e,c)||c===a||r(e,c,{get:()=>t[c],enumerable:!(u=o(t,c))||u.enumerable});return e},c=(e,o,s)=>(s=null!=e?t(a(e)):{},u(!o&&e&&e.__esModule?s:r(s,"default",{value:e,enumerable:!0}),e)),i={};((e,t)=>{for(var o in t)r(e,o,{get:t[o],enumerable:!0})})(i,{DestinationServer:()=>y,Elb:()=>b,getHashServer:()=>h,sendServer:()=>f}),module.exports=(e=i,u(r({},"__esModule",{value:!0}),e));var d=require("@walkeros/core"),l=c(require("http")),p=c(require("https"));function f(e,t,r={}){const o=(0,d.getHeaders)(r.headers),s=(0,d.transformData)(t),a=r.method||"POST",n=r.timeout||5e3;return new Promise(t=>{const r=new URL(e),u="https:"===r.protocol?p:l,c={method:a,headers:o},i=u.request(r,c,e=>{const r=[];e.on("data",e=>{r.push(e)}),e.on("end",()=>{const o=!!(e.statusCode&&e.statusCode>=200&&e.statusCode<300),s=Buffer.concat(r).toString(),a=(0,d.tryCatch)(JSON.parse,()=>s)(s);t({ok:o,data:a,error:o?void 0:`${e.statusCode} ${e.statusMessage}`})})});i.on("error",e=>{t({ok:!1,error:e.message})}),i.on("timeout",()=>{i.destroy(),t({ok:!1,error:"Request timeout"})}),i.setTimeout(n),s&&i.write(s),i.end()})}var m=require("crypto");async function h(e,t){return(await async function(e){const t=(0,m.createHash)("sha256");return t.update(e),t.digest("hex")}(e)).slice(0,t)}var y={},b={};//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/sendServer.ts","../src/getHashServer.ts","../src/types/destination.ts","../src/types/elb.ts"],"sourcesContent":["// Export server-specific utilities\nexport * from './sendServer';\nexport * from './getHashServer';\n\n// Export server-specific types\nexport * from './types';\n","import type { SendDataValue, SendHeaders, SendResponse } from '@walkeros/core';\nimport { getHeaders, transformData, tryCatch } from '@walkeros/core';\nimport * as http from 'http';\nimport * as https from 'https';\n\nexport interface SendServerOptions {\n headers?: SendHeaders;\n method?: string;\n timeout?: number;\n}\n\nexport function sendServer(\n url: string,\n data?: SendDataValue,\n options: SendServerOptions = {},\n): Promise<SendResponse> {\n const headers = getHeaders(options.headers);\n const body = transformData(data);\n const method = options.method || 'POST';\n const timeout = options.timeout || 5000;\n\n return new Promise((resolve) => {\n const urlObj = new URL(url);\n const lib = urlObj.protocol === 'https:' ? https : http;\n const options: http.RequestOptions | https.RequestOptions = {\n method,\n headers,\n };\n\n const req = lib.request(urlObj, options, (res) => {\n const chunks: Uint8Array[] = [];\n\n res.on('data', (chunk) => {\n chunks.push(chunk);\n });\n\n res.on('end', () => {\n const ok = !!(\n res.statusCode &&\n res.statusCode >= 200 &&\n res.statusCode < 300\n );\n\n const responseData = Buffer.concat(chunks).toString();\n const parsedData = tryCatch(\n JSON.parse,\n () => responseData,\n )(responseData);\n\n resolve({\n ok,\n data: parsedData,\n error: ok ? undefined : `${res.statusCode} ${res.statusMessage}`,\n });\n });\n });\n\n req.on('error', (error) => {\n resolve({\n ok: false,\n error: error.message,\n });\n });\n\n req.on('timeout', () => {\n req.destroy();\n resolve({\n ok: false,\n error: 'Request timeout',\n });\n });\n\n req.setTimeout(timeout);\n\n if (body) req.write(body);\n\n req.end();\n });\n}\n","import { createHash } from 'crypto';\n\nasync function sha256(message: string): Promise<string> {\n const hash = createHash('sha256');\n hash.update(message);\n return hash.digest('hex');\n}\n\nexport async function getHashServer(\n str: string,\n length?: number,\n): Promise<string> {\n return (await sha256(str)).slice(0, length);\n}\n","import type { Destination as WalkerOSDestination } from '@walkeros/core';\n\nexport interface Destination<Settings = unknown, Mapping = unknown>\n extends WalkerOSDestination.Instance<Settings, Mapping> {}\n\nexport type Init = WalkerOSDestination.Init;\n\nexport type Config<\n Settings = unknown,\n Mapping = unknown,\n> = WalkerOSDestination.Config<Settings, Mapping>;\n\nexport type PartialConfig<\n Settings = unknown,\n Mapping = unknown,\n> = WalkerOSDestination.PartialConfig<Settings, Mapping>;\n\nexport type InitFn<\n Settings = unknown,\n Mapping = unknown,\n> = WalkerOSDestination.InitFn<Settings, Mapping>;\n\nexport type PushFn<\n Settings = unknown,\n Mapping = unknown,\n> = WalkerOSDestination.PushFn<Settings, Mapping>;\n\nexport type PushEvent<Mapping = unknown> =\n WalkerOSDestination.PushEvent<Mapping>;\n\nexport type PushEvents<Mapping = unknown> =\n WalkerOSDestination.PushEvents<Mapping>;\n","import type { Elb } from '@walkeros/core';\nimport type { Destination, Init, Config } from './destination';\n\nexport type Fn<R = Return> = Elb.Fn<R> & CommandDestination<R> & CommandRun<R>;\n\nexport type CommandDestination<R = void> = (\n event: 'walker destination',\n destination: Destination | Init,\n config?: Config,\n) => R;\n\nexport type CommandRun<R = void> = (event: 'walker run') => R;\n\nexport type PushData = Elb.PushData | Destination | Init;\n\nexport type PushOptions = Config;\n\nexport type PushResult = Elb.PushResult;\n\nexport type Return<R = Promise<PushResult>> = R;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,kBAAoD;AACpD,WAAsB;AACtB,YAAuB;AAQhB,SAAS,WACd,KACA,MACA,UAA6B,CAAC,GACP;AACvB,QAAM,cAAU,wBAAW,QAAQ,OAAO;AAC1C,QAAM,WAAO,2BAAc,IAAI;AAC/B,QAAM,SAAS,QAAQ,UAAU;AACjC,QAAM,UAAU,QAAQ,WAAW;AAEnC,SAAO,IAAI,QAAQ,CAAC,YAAY;AAC9B,UAAM,SAAS,IAAI,IAAI,GAAG;AAC1B,UAAM,MAAM,OAAO,aAAa,WAAW,QAAQ;AACnD,UAAMA,WAAsD;AAAA,MAC1D;AAAA,MACA;AAAA,IACF;AAEA,UAAM,MAAM,IAAI,QAAQ,QAAQA,UAAS,CAAC,QAAQ;AAChD,YAAM,SAAuB,CAAC;AAE9B,UAAI,GAAG,QAAQ,CAAC,UAAU;AACxB,eAAO,KAAK,KAAK;AAAA,MACnB,CAAC;AAED,UAAI,GAAG,OAAO,MAAM;AAClB,cAAM,KAAK,CAAC,EACV,IAAI,cACJ,IAAI,cAAc,OAClB,IAAI,aAAa;AAGnB,cAAM,eAAe,OAAO,OAAO,MAAM,EAAE,SAAS;AACpD,cAAM,iBAAa;AAAA,UACjB,KAAK;AAAA,UACL,MAAM;AAAA,QACR,EAAE,YAAY;AAEd,gBAAQ;AAAA,UACN;AAAA,UACA,MAAM;AAAA,UACN,OAAO,KAAK,SAAY,GAAG,IAAI,UAAU,IAAI,IAAI,aAAa;AAAA,QAChE,CAAC;AAAA,MACH,CAAC;AAAA,IACH,CAAC;AAED,QAAI,GAAG,SAAS,CAAC,UAAU;AACzB,cAAQ;AAAA,QACN,IAAI;AAAA,QACJ,OAAO,MAAM;AAAA,MACf,CAAC;AAAA,IACH,CAAC;AAED,QAAI,GAAG,WAAW,MAAM;AACtB,UAAI,QAAQ;AACZ,cAAQ;AAAA,QACN,IAAI;AAAA,QACJ,OAAO;AAAA,MACT,CAAC;AAAA,IACH,CAAC;AAED,QAAI,WAAW,OAAO;AAEtB,QAAI,KAAM,KAAI,MAAM,IAAI;AAExB,QAAI,IAAI;AAAA,EACV,CAAC;AACH;;;AC9EA,oBAA2B;AAE3B,eAAe,OAAO,SAAkC;AACtD,QAAM,WAAO,0BAAW,QAAQ;AAChC,OAAK,OAAO,OAAO;AACnB,SAAO,KAAK,OAAO,KAAK;AAC1B;AAEA,eAAsB,cACpB,KACA,QACiB;AACjB,UAAQ,MAAM,OAAO,GAAG,GAAG,MAAM,GAAG,MAAM;AAC5C;;;ACbA;;;ACAA;","names":["options"]}
package/dist/index.mjs ADDED
@@ -0,0 +1 @@
1
+ import{getHeaders as t,transformData as e,tryCatch as o}from"@walkeros/core";import*as r from"http";import*as s from"https";function a(a,n,i={}){const u=t(i.headers),c=e(n),d=i.method||"POST",m=i.timeout||5e3;return new Promise(t=>{const e=new URL(a),n="https:"===e.protocol?s:r,i={method:d,headers:u},p=n.request(e,i,e=>{const r=[];e.on("data",t=>{r.push(t)}),e.on("end",()=>{const s=!!(e.statusCode&&e.statusCode>=200&&e.statusCode<300),a=Buffer.concat(r).toString(),n=o(JSON.parse,()=>a)(a);t({ok:s,data:n,error:s?void 0:`${e.statusCode} ${e.statusMessage}`})})});p.on("error",e=>{t({ok:!1,error:e.message})}),p.on("timeout",()=>{p.destroy(),t({ok:!1,error:"Request timeout"})}),p.setTimeout(m),c&&p.write(c),p.end()})}import{createHash as n}from"crypto";async function i(t,e){return(await async function(t){const e=n("sha256");return e.update(t),e.digest("hex")}(t)).slice(0,e)}var u={},c={};export{u as DestinationServer,c as Elb,i as getHashServer,a as sendServer};//# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/sendServer.ts","../src/getHashServer.ts","../src/types/destination.ts","../src/types/elb.ts"],"sourcesContent":["import type { SendDataValue, SendHeaders, SendResponse } from '@walkeros/core';\nimport { getHeaders, transformData, tryCatch } from '@walkeros/core';\nimport * as http from 'http';\nimport * as https from 'https';\n\nexport interface SendServerOptions {\n headers?: SendHeaders;\n method?: string;\n timeout?: number;\n}\n\nexport function sendServer(\n url: string,\n data?: SendDataValue,\n options: SendServerOptions = {},\n): Promise<SendResponse> {\n const headers = getHeaders(options.headers);\n const body = transformData(data);\n const method = options.method || 'POST';\n const timeout = options.timeout || 5000;\n\n return new Promise((resolve) => {\n const urlObj = new URL(url);\n const lib = urlObj.protocol === 'https:' ? https : http;\n const options: http.RequestOptions | https.RequestOptions = {\n method,\n headers,\n };\n\n const req = lib.request(urlObj, options, (res) => {\n const chunks: Uint8Array[] = [];\n\n res.on('data', (chunk) => {\n chunks.push(chunk);\n });\n\n res.on('end', () => {\n const ok = !!(\n res.statusCode &&\n res.statusCode >= 200 &&\n res.statusCode < 300\n );\n\n const responseData = Buffer.concat(chunks).toString();\n const parsedData = tryCatch(\n JSON.parse,\n () => responseData,\n )(responseData);\n\n resolve({\n ok,\n data: parsedData,\n error: ok ? undefined : `${res.statusCode} ${res.statusMessage}`,\n });\n });\n });\n\n req.on('error', (error) => {\n resolve({\n ok: false,\n error: error.message,\n });\n });\n\n req.on('timeout', () => {\n req.destroy();\n resolve({\n ok: false,\n error: 'Request timeout',\n });\n });\n\n req.setTimeout(timeout);\n\n if (body) req.write(body);\n\n req.end();\n });\n}\n","import { createHash } from 'crypto';\n\nasync function sha256(message: string): Promise<string> {\n const hash = createHash('sha256');\n hash.update(message);\n return hash.digest('hex');\n}\n\nexport async function getHashServer(\n str: string,\n length?: number,\n): Promise<string> {\n return (await sha256(str)).slice(0, length);\n}\n","import type { Destination as WalkerOSDestination } from '@walkeros/core';\n\nexport interface Destination<Settings = unknown, Mapping = unknown>\n extends WalkerOSDestination.Instance<Settings, Mapping> {}\n\nexport type Init = WalkerOSDestination.Init;\n\nexport type Config<\n Settings = unknown,\n Mapping = unknown,\n> = WalkerOSDestination.Config<Settings, Mapping>;\n\nexport type PartialConfig<\n Settings = unknown,\n Mapping = unknown,\n> = WalkerOSDestination.PartialConfig<Settings, Mapping>;\n\nexport type InitFn<\n Settings = unknown,\n Mapping = unknown,\n> = WalkerOSDestination.InitFn<Settings, Mapping>;\n\nexport type PushFn<\n Settings = unknown,\n Mapping = unknown,\n> = WalkerOSDestination.PushFn<Settings, Mapping>;\n\nexport type PushEvent<Mapping = unknown> =\n WalkerOSDestination.PushEvent<Mapping>;\n\nexport type PushEvents<Mapping = unknown> =\n WalkerOSDestination.PushEvents<Mapping>;\n","import type { Elb } from '@walkeros/core';\nimport type { Destination, Init, Config } from './destination';\n\nexport type Fn<R = Return> = Elb.Fn<R> & CommandDestination<R> & CommandRun<R>;\n\nexport type CommandDestination<R = void> = (\n event: 'walker destination',\n destination: Destination | Init,\n config?: Config,\n) => R;\n\nexport type CommandRun<R = void> = (event: 'walker run') => R;\n\nexport type PushData = Elb.PushData | Destination | Init;\n\nexport type PushOptions = Config;\n\nexport type PushResult = Elb.PushResult;\n\nexport type Return<R = Promise<PushResult>> = R;\n"],"mappings":";AACA,SAAS,YAAY,eAAe,gBAAgB;AACpD,YAAY,UAAU;AACtB,YAAY,WAAW;AAQhB,SAAS,WACd,KACA,MACA,UAA6B,CAAC,GACP;AACvB,QAAM,UAAU,WAAW,QAAQ,OAAO;AAC1C,QAAM,OAAO,cAAc,IAAI;AAC/B,QAAM,SAAS,QAAQ,UAAU;AACjC,QAAM,UAAU,QAAQ,WAAW;AAEnC,SAAO,IAAI,QAAQ,CAAC,YAAY;AAC9B,UAAM,SAAS,IAAI,IAAI,GAAG;AAC1B,UAAM,MAAM,OAAO,aAAa,WAAW,QAAQ;AACnD,UAAMA,WAAsD;AAAA,MAC1D;AAAA,MACA;AAAA,IACF;AAEA,UAAM,MAAM,IAAI,QAAQ,QAAQA,UAAS,CAAC,QAAQ;AAChD,YAAM,SAAuB,CAAC;AAE9B,UAAI,GAAG,QAAQ,CAAC,UAAU;AACxB,eAAO,KAAK,KAAK;AAAA,MACnB,CAAC;AAED,UAAI,GAAG,OAAO,MAAM;AAClB,cAAM,KAAK,CAAC,EACV,IAAI,cACJ,IAAI,cAAc,OAClB,IAAI,aAAa;AAGnB,cAAM,eAAe,OAAO,OAAO,MAAM,EAAE,SAAS;AACpD,cAAM,aAAa;AAAA,UACjB,KAAK;AAAA,UACL,MAAM;AAAA,QACR,EAAE,YAAY;AAEd,gBAAQ;AAAA,UACN;AAAA,UACA,MAAM;AAAA,UACN,OAAO,KAAK,SAAY,GAAG,IAAI,UAAU,IAAI,IAAI,aAAa;AAAA,QAChE,CAAC;AAAA,MACH,CAAC;AAAA,IACH,CAAC;AAED,QAAI,GAAG,SAAS,CAAC,UAAU;AACzB,cAAQ;AAAA,QACN,IAAI;AAAA,QACJ,OAAO,MAAM;AAAA,MACf,CAAC;AAAA,IACH,CAAC;AAED,QAAI,GAAG,WAAW,MAAM;AACtB,UAAI,QAAQ;AACZ,cAAQ;AAAA,QACN,IAAI;AAAA,QACJ,OAAO;AAAA,MACT,CAAC;AAAA,IACH,CAAC;AAED,QAAI,WAAW,OAAO;AAEtB,QAAI,KAAM,KAAI,MAAM,IAAI;AAExB,QAAI,IAAI;AAAA,EACV,CAAC;AACH;;;AC9EA,SAAS,kBAAkB;AAE3B,eAAe,OAAO,SAAkC;AACtD,QAAM,OAAO,WAAW,QAAQ;AAChC,OAAK,OAAO,OAAO;AACnB,SAAO,KAAK,OAAO,KAAK;AAC1B;AAEA,eAAsB,cACpB,KACA,QACiB;AACjB,UAAQ,MAAM,OAAO,GAAG,GAAG,MAAM,GAAG,MAAM;AAC5C;;;ACbA;;;ACAA;","names":["options"]}
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@walkeros/server-core",
3
+ "description": "Server-specific utilities for walkerOS",
4
+ "version": "0.0.7",
5
+ "license": "MIT",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.mjs",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.mjs",
13
+ "require": "./dist/index.js"
14
+ }
15
+ },
16
+ "files": [
17
+ "dist/**"
18
+ ],
19
+ "scripts": {
20
+ "build": "tsup --silent",
21
+ "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
22
+ "dev": "jest --watchAll --colors",
23
+ "lint": "tsc && eslint \"**/*.ts*\"",
24
+ "test": "jest",
25
+ "update": "npx npm-check-updates -u && npm update"
26
+ },
27
+ "dependencies": {
28
+ "@walkeros/core": "0.0.7"
29
+ },
30
+ "repository": {
31
+ "url": "git+https://github.com/elbwalker/walkerOS.git",
32
+ "directory": "packages/server/core"
33
+ },
34
+ "author": "elbwalker <hello@elbwalker.com>",
35
+ "homepage": "https://github.com/elbwalker/walkerOS#readme",
36
+ "bugs": {
37
+ "url": "https://github.com/elbwalker/walkerOS/issues"
38
+ },
39
+ "keywords": [
40
+ "walker",
41
+ "walkerOS",
42
+ "server",
43
+ "node",
44
+ "utilities"
45
+ ],
46
+ "funding": [
47
+ {
48
+ "type": "GitHub Sponsors",
49
+ "url": "https://github.com/sponsors/elbwalker"
50
+ }
51
+ ]
52
+ }