@walkeros/source-demo 0.6.0 → 0.6.1

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.js CHANGED
@@ -1 +1 @@
1
- "use strict";var e,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,n=(e,r)=>{for(var o in r)t(e,o,{get:r[o],enumerable:!0})},u={};n(u,{SourceDemo:()=>a,default:()=>d,examples:()=>c,sourceDemo:()=>y}),module.exports=(e=u,((e,n,u,a)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let c of o(n))s.call(e,c)||c===u||t(e,c,{get:()=>n[c],enumerable:!(a=r(n,c))||a.enumerable});return e})(t({},"__esModule",{value:!0}),e));var a={},c={};n(c,{env:()=>l});var l={};n(l,{init:()=>m,push:()=>b,simulation:()=>g});var i=async()=>({ok:!0,successful:[],queued:[],failed:[]}),p=()=>{},f={error:p,info:p,debug:p,throw:e=>{throw"string"==typeof e?new Error(e):e},scope:()=>f},m=void 0,b={push:i,command:i,elb:i,logger:f},g=["call:elb"],y=async(e,t)=>{const{elb:r}=t,o={...e,settings:e?.settings||{events:[]}};return(o.settings?.events||[]).forEach(e=>{const{delay:t,...o}=e;setTimeout(()=>r(o),t||0)}),{type:"demo",config:o,push:r}},d=y;//# sourceMappingURL=index.js.map
1
+ "use strict";var e,t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,n=Object.prototype.hasOwnProperty,s=(e,o)=>{for(var r in o)t(e,r,{get:o[r],enumerable:!0})},a={};s(a,{SourceDemo:()=>c,default:()=>v,examples:()=>i,sourceDemo:()=>y}),module.exports=(e=a,((e,s,a,c)=>{if(s&&"object"==typeof s||"function"==typeof s)for(let i of r(s))n.call(e,i)||i===a||t(e,i,{get:()=>s[i],enumerable:!(c=o(s,i))||c.enumerable});return e})(t({},"__esModule",{value:!0}),e));var c={},i={};s(i,{env:()=>l});var l={};s(l,{init:()=>g,push:()=>m,simulation:()=>b});var u=async()=>({ok:!0}),p=()=>{},f={error:p,info:p,debug:p,throw:e=>{throw"string"==typeof e?new Error(e):e},scope:()=>f},g=void 0,m={push:u,command:u,elb:u,logger:f},b=["call:elb"],y=async e=>{const{config:t,env:o}=e,{elb:r}=o,n={...t,settings:t?.settings||{events:[]}};return(n.settings?.events||[]).forEach(e=>{const{delay:t,...o}=e;setTimeout(()=>r(o),t||0)}),{type:"demo",config:n,push:r}},v=y;//# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/types.ts","../src/examples/index.ts","../src/examples/env.ts"],"sourcesContent":["import type { Source } from '@walkeros/core';\nimport type { Types } from './types';\n\nexport * as SourceDemo from './types';\nexport * as examples from './examples';\n\n/**\n * Demo source for walkerOS\n *\n * Pushes configured events to the collector with optional delays.\n * Perfect for testing and demonstrations without external dependencies.\n */\nexport const sourceDemo: Source.Init<Types> = async (\n config: Partial<Source.Config<Types>>,\n env: Source.Env<Types>,\n): Promise<Source.Instance<Types>> => {\n const { elb } = env;\n\n const fullConfig: Source.Config<Types> = {\n ...config,\n settings: config?.settings || { events: [] },\n };\n\n const events = fullConfig.settings?.events || [];\n\n // Push each event with optional delay\n events.forEach((event) => {\n const { delay, ...partialEvent } = event;\n setTimeout(() => elb(partialEvent), delay || 0);\n });\n\n return {\n type: 'demo',\n config: fullConfig,\n push: elb,\n };\n};\n\nexport default sourceDemo;\n","import type { Source, Elb, WalkerOS } from '@walkeros/core';\n\nexport interface Settings {\n events: Array<WalkerOS.PartialEvent & { delay?: number }>;\n}\n\nexport interface Mapping {}\n\nexport type Push = Elb.Fn;\n\nexport interface Env extends Source.BaseEnv {\n elb: Elb.Fn;\n}\n\nexport type Types = Source.Types<Settings, Mapping, Push, Env>;\n","export * as env from './env';\n","import type { Env } from '../types';\nimport type { Logger } from '@walkeros/core';\n\n/**\n * Example environment configurations for source demo\n */\n\nconst noop = async () => ({\n ok: true,\n successful: [],\n queued: [],\n failed: [],\n});\n\n// Simple no-op logger for demo purposes\nconst noopFn = () => {};\nconst noopLogger: Logger.Instance = {\n error: noopFn,\n info: noopFn,\n debug: noopFn,\n throw: (message: string | Error) => {\n throw typeof message === 'string' ? new Error(message) : message;\n },\n scope: () => noopLogger,\n};\n\nexport const init: Env | undefined = undefined;\n\nexport const push: Env = {\n push: noop as Env['push'],\n command: noop as Env['command'],\n elb: noop as Env['elb'],\n logger: noopLogger,\n};\n\n/**\n * Simulation tracking paths\n */\nexport const simulation = ['call:elb'];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;;;ACAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,IAAM,OAAO,aAAa;AAAA,EACxB,IAAI;AAAA,EACJ,YAAY,CAAC;AAAA,EACb,QAAQ,CAAC;AAAA,EACT,QAAQ,CAAC;AACX;AAGA,IAAM,SAAS,MAAM;AAAC;AACtB,IAAM,aAA8B;AAAA,EAClC,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO,CAAC,YAA4B;AAClC,UAAM,OAAO,YAAY,WAAW,IAAI,MAAM,OAAO,IAAI;AAAA,EAC3D;AAAA,EACA,OAAO,MAAM;AACf;AAEO,IAAM,OAAwB;AAE9B,IAAM,OAAY;AAAA,EACvB,MAAM;AAAA,EACN,SAAS;AAAA,EACT,KAAK;AAAA,EACL,QAAQ;AACV;AAKO,IAAM,aAAa,CAAC,UAAU;;;AH1B9B,IAAM,aAAiC,OAC5C,QACA,QACoC;AACpC,QAAM,EAAE,IAAI,IAAI;AAEhB,QAAM,aAAmC;AAAA,IACvC,GAAG;AAAA,IACH,UAAU,QAAQ,YAAY,EAAE,QAAQ,CAAC,EAAE;AAAA,EAC7C;AAEA,QAAM,SAAS,WAAW,UAAU,UAAU,CAAC;AAG/C,SAAO,QAAQ,CAAC,UAAU;AACxB,UAAM,EAAE,OAAO,GAAG,aAAa,IAAI;AACnC,eAAW,MAAM,IAAI,YAAY,GAAG,SAAS,CAAC;AAAA,EAChD,CAAC;AAED,SAAO;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,MAAM;AAAA,EACR;AACF;AAEA,IAAO,gBAAQ;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts","../src/types.ts","../src/examples/index.ts","../src/examples/env.ts"],"sourcesContent":["import type { Source } from '@walkeros/core';\nimport type { Types } from './types';\n\nexport * as SourceDemo from './types';\nexport * as examples from './examples';\n\n/**\n * Demo source for walkerOS\n *\n * Pushes configured events to the collector with optional delays.\n * Perfect for testing and demonstrations without external dependencies.\n */\nexport const sourceDemo: Source.Init<Types> = async (\n context,\n): Promise<Source.Instance<Types>> => {\n const { config, env } = context;\n const { elb } = env;\n\n const fullConfig: Source.Config<Types> = {\n ...config,\n settings: config?.settings || { events: [] },\n };\n\n const events = fullConfig.settings?.events || [];\n\n // Push each event with optional delay\n events.forEach((event) => {\n const { delay, ...partialEvent } = event;\n setTimeout(() => elb(partialEvent), delay || 0);\n });\n\n return {\n type: 'demo',\n config: fullConfig,\n push: elb,\n };\n};\n\nexport default sourceDemo;\n","import type { Source, Elb, WalkerOS } from '@walkeros/core';\n\nexport interface Settings {\n events: Array<WalkerOS.PartialEvent & { delay?: number }>;\n}\n\nexport interface Mapping {}\n\nexport type Push = Elb.Fn;\n\nexport interface Env extends Source.BaseEnv {\n elb: Elb.Fn;\n}\n\nexport type Types = Source.Types<Settings, Mapping, Push, Env>;\n","export * as env from './env';\n","import type { Env } from '../types';\nimport type { Logger } from '@walkeros/core';\n\n/**\n * Example environment configurations for source demo\n */\n\nconst noop = async () => ({\n ok: true,\n});\n\n// Simple no-op logger for demo purposes\nconst noopFn = () => {};\nconst noopLogger: Logger.Instance = {\n error: noopFn,\n info: noopFn,\n debug: noopFn,\n throw: (message: string | Error) => {\n throw typeof message === 'string' ? new Error(message) : message;\n },\n scope: () => noopLogger,\n};\n\nexport const init: Env | undefined = undefined;\n\nexport const push: Env = {\n push: noop as Env['push'],\n command: noop as Env['command'],\n elb: noop as Env['elb'],\n logger: noopLogger,\n};\n\n/**\n * Simulation tracking paths\n */\nexport const simulation = ['call:elb'];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;;;ACAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,IAAM,OAAO,aAAa;AAAA,EACxB,IAAI;AACN;AAGA,IAAM,SAAS,MAAM;AAAC;AACtB,IAAM,aAA8B;AAAA,EAClC,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO,CAAC,YAA4B;AAClC,UAAM,OAAO,YAAY,WAAW,IAAI,MAAM,OAAO,IAAI;AAAA,EAC3D;AAAA,EACA,OAAO,MAAM;AACf;AAEO,IAAM,OAAwB;AAE9B,IAAM,OAAY;AAAA,EACvB,MAAM;AAAA,EACN,SAAS;AAAA,EACT,KAAK;AAAA,EACL,QAAQ;AACV;AAKO,IAAM,aAAa,CAAC,UAAU;;;AHvB9B,IAAM,aAAiC,OAC5C,YACoC;AACpC,QAAM,EAAE,QAAQ,IAAI,IAAI;AACxB,QAAM,EAAE,IAAI,IAAI;AAEhB,QAAM,aAAmC;AAAA,IACvC,GAAG;AAAA,IACH,UAAU,QAAQ,YAAY,EAAE,QAAQ,CAAC,EAAE;AAAA,EAC7C;AAEA,QAAM,SAAS,WAAW,UAAU,UAAU,CAAC;AAG/C,SAAO,QAAQ,CAAC,UAAU;AACxB,UAAM,EAAE,OAAO,GAAG,aAAa,IAAI;AACnC,eAAW,MAAM,IAAI,YAAY,GAAG,SAAS,CAAC;AAAA,EAChD,CAAC;AAED,SAAO;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,MAAM;AAAA,EACR;AACF;AAEA,IAAO,gBAAQ;","names":[]}
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- var e=Object.defineProperty,s=(s,t)=>{for(var o in t)e(s,o,{get:t[o],enumerable:!0})},t={},o={};s(o,{env:()=>r});var r={};s(r,{init:()=>u,push:()=>c,simulation:()=>l});var n=async()=>({ok:!0,successful:[],queued:[],failed:[]}),a=()=>{},i={error:a,info:a,debug:a,throw:e=>{throw"string"==typeof e?new Error(e):e},scope:()=>i},u=void 0,c={push:n,command:n,elb:n,logger:i},l=["call:elb"],d=async(e,s)=>{const{elb:t}=s,o={...e,settings:e?.settings||{events:[]}};return(o.settings?.events||[]).forEach(e=>{const{delay:s,...o}=e;setTimeout(()=>t(o),s||0)}),{type:"demo",config:o,push:t}},f=d;export{t as SourceDemo,f as default,o as examples,d as sourceDemo};//# sourceMappingURL=index.mjs.map
1
+ var e=Object.defineProperty,t=(t,o)=>{for(var n in o)e(t,n,{get:o[n],enumerable:!0})},o={},n={};t(n,{env:()=>r});var r={};t(r,{init:()=>c,push:()=>l,simulation:()=>g});var s=async()=>({ok:!0}),a=()=>{},i={error:a,info:a,debug:a,throw:e=>{throw"string"==typeof e?new Error(e):e},scope:()=>i},c=void 0,l={push:s,command:s,elb:s,logger:i},g=["call:elb"],u=async e=>{const{config:t,env:o}=e,{elb:n}=o,r={...t,settings:t?.settings||{events:[]}};return(r.settings?.events||[]).forEach(e=>{const{delay:t,...o}=e;setTimeout(()=>n(o),t||0)}),{type:"demo",config:r,push:n}},p=u;export{o as SourceDemo,p as default,n as examples,u as sourceDemo};//# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/types.ts","../src/examples/index.ts","../src/examples/env.ts","../src/index.ts"],"sourcesContent":["import type { Source, Elb, WalkerOS } from '@walkeros/core';\n\nexport interface Settings {\n events: Array<WalkerOS.PartialEvent & { delay?: number }>;\n}\n\nexport interface Mapping {}\n\nexport type Push = Elb.Fn;\n\nexport interface Env extends Source.BaseEnv {\n elb: Elb.Fn;\n}\n\nexport type Types = Source.Types<Settings, Mapping, Push, Env>;\n","export * as env from './env';\n","import type { Env } from '../types';\nimport type { Logger } from '@walkeros/core';\n\n/**\n * Example environment configurations for source demo\n */\n\nconst noop = async () => ({\n ok: true,\n successful: [],\n queued: [],\n failed: [],\n});\n\n// Simple no-op logger for demo purposes\nconst noopFn = () => {};\nconst noopLogger: Logger.Instance = {\n error: noopFn,\n info: noopFn,\n debug: noopFn,\n throw: (message: string | Error) => {\n throw typeof message === 'string' ? new Error(message) : message;\n },\n scope: () => noopLogger,\n};\n\nexport const init: Env | undefined = undefined;\n\nexport const push: Env = {\n push: noop as Env['push'],\n command: noop as Env['command'],\n elb: noop as Env['elb'],\n logger: noopLogger,\n};\n\n/**\n * Simulation tracking paths\n */\nexport const simulation = ['call:elb'];\n","import type { Source } from '@walkeros/core';\nimport type { Types } from './types';\n\nexport * as SourceDemo from './types';\nexport * as examples from './examples';\n\n/**\n * Demo source for walkerOS\n *\n * Pushes configured events to the collector with optional delays.\n * Perfect for testing and demonstrations without external dependencies.\n */\nexport const sourceDemo: Source.Init<Types> = async (\n config: Partial<Source.Config<Types>>,\n env: Source.Env<Types>,\n): Promise<Source.Instance<Types>> => {\n const { elb } = env;\n\n const fullConfig: Source.Config<Types> = {\n ...config,\n settings: config?.settings || { events: [] },\n };\n\n const events = fullConfig.settings?.events || [];\n\n // Push each event with optional delay\n events.forEach((event) => {\n const { delay, ...partialEvent } = event;\n setTimeout(() => elb(partialEvent), delay || 0);\n });\n\n return {\n type: 'demo',\n config: fullConfig,\n push: elb,\n };\n};\n\nexport default sourceDemo;\n"],"mappings":";;;;;;;AAAA;;;ACAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,IAAM,OAAO,aAAa;AAAA,EACxB,IAAI;AAAA,EACJ,YAAY,CAAC;AAAA,EACb,QAAQ,CAAC;AAAA,EACT,QAAQ,CAAC;AACX;AAGA,IAAM,SAAS,MAAM;AAAC;AACtB,IAAM,aAA8B;AAAA,EAClC,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO,CAAC,YAA4B;AAClC,UAAM,OAAO,YAAY,WAAW,IAAI,MAAM,OAAO,IAAI;AAAA,EAC3D;AAAA,EACA,OAAO,MAAM;AACf;AAEO,IAAM,OAAwB;AAE9B,IAAM,OAAY;AAAA,EACvB,MAAM;AAAA,EACN,SAAS;AAAA,EACT,KAAK;AAAA,EACL,QAAQ;AACV;AAKO,IAAM,aAAa,CAAC,UAAU;;;AC1B9B,IAAM,aAAiC,OAC5C,QACA,QACoC;AACpC,QAAM,EAAE,IAAI,IAAI;AAEhB,QAAM,aAAmC;AAAA,IACvC,GAAG;AAAA,IACH,UAAU,QAAQ,YAAY,EAAE,QAAQ,CAAC,EAAE;AAAA,EAC7C;AAEA,QAAM,SAAS,WAAW,UAAU,UAAU,CAAC;AAG/C,SAAO,QAAQ,CAAC,UAAU;AACxB,UAAM,EAAE,OAAO,GAAG,aAAa,IAAI;AACnC,eAAW,MAAM,IAAI,YAAY,GAAG,SAAS,CAAC;AAAA,EAChD,CAAC;AAED,SAAO;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,MAAM;AAAA,EACR;AACF;AAEA,IAAO,gBAAQ;","names":[]}
1
+ {"version":3,"sources":["../src/types.ts","../src/examples/index.ts","../src/examples/env.ts","../src/index.ts"],"sourcesContent":["import type { Source, Elb, WalkerOS } from '@walkeros/core';\n\nexport interface Settings {\n events: Array<WalkerOS.PartialEvent & { delay?: number }>;\n}\n\nexport interface Mapping {}\n\nexport type Push = Elb.Fn;\n\nexport interface Env extends Source.BaseEnv {\n elb: Elb.Fn;\n}\n\nexport type Types = Source.Types<Settings, Mapping, Push, Env>;\n","export * as env from './env';\n","import type { Env } from '../types';\nimport type { Logger } from '@walkeros/core';\n\n/**\n * Example environment configurations for source demo\n */\n\nconst noop = async () => ({\n ok: true,\n});\n\n// Simple no-op logger for demo purposes\nconst noopFn = () => {};\nconst noopLogger: Logger.Instance = {\n error: noopFn,\n info: noopFn,\n debug: noopFn,\n throw: (message: string | Error) => {\n throw typeof message === 'string' ? new Error(message) : message;\n },\n scope: () => noopLogger,\n};\n\nexport const init: Env | undefined = undefined;\n\nexport const push: Env = {\n push: noop as Env['push'],\n command: noop as Env['command'],\n elb: noop as Env['elb'],\n logger: noopLogger,\n};\n\n/**\n * Simulation tracking paths\n */\nexport const simulation = ['call:elb'];\n","import type { Source } from '@walkeros/core';\nimport type { Types } from './types';\n\nexport * as SourceDemo from './types';\nexport * as examples from './examples';\n\n/**\n * Demo source for walkerOS\n *\n * Pushes configured events to the collector with optional delays.\n * Perfect for testing and demonstrations without external dependencies.\n */\nexport const sourceDemo: Source.Init<Types> = async (\n context,\n): Promise<Source.Instance<Types>> => {\n const { config, env } = context;\n const { elb } = env;\n\n const fullConfig: Source.Config<Types> = {\n ...config,\n settings: config?.settings || { events: [] },\n };\n\n const events = fullConfig.settings?.events || [];\n\n // Push each event with optional delay\n events.forEach((event) => {\n const { delay, ...partialEvent } = event;\n setTimeout(() => elb(partialEvent), delay || 0);\n });\n\n return {\n type: 'demo',\n config: fullConfig,\n push: elb,\n };\n};\n\nexport default sourceDemo;\n"],"mappings":";;;;;;;AAAA;;;ACAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,IAAM,OAAO,aAAa;AAAA,EACxB,IAAI;AACN;AAGA,IAAM,SAAS,MAAM;AAAC;AACtB,IAAM,aAA8B;AAAA,EAClC,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO,CAAC,YAA4B;AAClC,UAAM,OAAO,YAAY,WAAW,IAAI,MAAM,OAAO,IAAI;AAAA,EAC3D;AAAA,EACA,OAAO,MAAM;AACf;AAEO,IAAM,OAAwB;AAE9B,IAAM,OAAY;AAAA,EACvB,MAAM;AAAA,EACN,SAAS;AAAA,EACT,KAAK;AAAA,EACL,QAAQ;AACV;AAKO,IAAM,aAAa,CAAC,UAAU;;;ACvB9B,IAAM,aAAiC,OAC5C,YACoC;AACpC,QAAM,EAAE,QAAQ,IAAI,IAAI;AACxB,QAAM,EAAE,IAAI,IAAI;AAEhB,QAAM,aAAmC;AAAA,IACvC,GAAG;AAAA,IACH,UAAU,QAAQ,YAAY,EAAE,QAAQ,CAAC,EAAE;AAAA,EAC7C;AAEA,QAAM,SAAS,WAAW,UAAU,UAAU,CAAC;AAG/C,SAAO,QAAQ,CAAC,UAAU;AACxB,UAAM,EAAE,OAAO,GAAG,aAAa,IAAI;AACnC,eAAW,MAAM,IAAI,YAAY,GAAG,SAAS,CAAC;AAAA,EAChD,CAAC;AAED,SAAO;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,MAAM;AAAA,EACR;AACF;AAEA,IAAO,gBAAQ;","names":[]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@walkeros/source-demo",
3
3
  "description": "Demo source for walkerOS - generates events from config",
4
- "version": "0.6.0",
4
+ "version": "0.6.1",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.mjs",
@@ -24,7 +24,7 @@
24
24
  "test": "jest"
25
25
  },
26
26
  "dependencies": {
27
- "@walkeros/core": "0.6.0"
27
+ "@walkeros/core": "0.7.0"
28
28
  },
29
29
  "repository": {
30
30
  "url": "git+https://github.com/elbwalker/walkerOS.git",