@walkeros/source-demo 0.5.0 → 0.5.1-next.0

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/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.5.0",
4
+ "version": "0.5.1-next.0",
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.5.0"
27
+ "@walkeros/core": "0.5.1-next.0"
28
28
  },
29
29
  "repository": {
30
30
  "url": "git+https://github.com/elbwalker/walkerOS.git",
package/dist/index.d.mts DELETED
@@ -1,52 +0,0 @@
1
- import { Source, WalkerOS, Elb } from '@walkeros/core';
2
-
3
- interface Settings {
4
- events: Array<WalkerOS.PartialEvent & {
5
- delay?: number;
6
- }>;
7
- }
8
- interface Mapping {
9
- }
10
- type Push = Elb.Fn;
11
- interface Env extends Source.BaseEnv {
12
- elb: Elb.Fn;
13
- }
14
- type Types = Source.Types<Settings, Mapping, Push, Env>;
15
-
16
- type types_Env = Env;
17
- type types_Mapping = Mapping;
18
- type types_Push = Push;
19
- type types_Settings = Settings;
20
- type types_Types = Types;
21
- declare namespace types {
22
- export type { types_Env as Env, types_Mapping as Mapping, types_Push as Push, types_Settings as Settings, types_Types as Types };
23
- }
24
-
25
- declare const init: Env | undefined;
26
- declare const push: Env;
27
- /**
28
- * Simulation tracking paths
29
- */
30
- declare const simulation: string[];
31
-
32
- declare const env_init: typeof init;
33
- declare const env_push: typeof push;
34
- declare const env_simulation: typeof simulation;
35
- declare namespace env {
36
- export { env_init as init, env_push as push, env_simulation as simulation };
37
- }
38
-
39
- declare const index_env: typeof env;
40
- declare namespace index {
41
- export { index_env as env };
42
- }
43
-
44
- /**
45
- * Demo source for walkerOS
46
- *
47
- * Pushes configured events to the collector with optional delays.
48
- * Perfect for testing and demonstrations without external dependencies.
49
- */
50
- declare const sourceDemo: Source.Init<Types>;
51
-
52
- export { types as SourceDemo, sourceDemo as default, index as examples, sourceDemo };
package/dist/index.d.ts DELETED
@@ -1,52 +0,0 @@
1
- import { Source, WalkerOS, Elb } from '@walkeros/core';
2
-
3
- interface Settings {
4
- events: Array<WalkerOS.PartialEvent & {
5
- delay?: number;
6
- }>;
7
- }
8
- interface Mapping {
9
- }
10
- type Push = Elb.Fn;
11
- interface Env extends Source.BaseEnv {
12
- elb: Elb.Fn;
13
- }
14
- type Types = Source.Types<Settings, Mapping, Push, Env>;
15
-
16
- type types_Env = Env;
17
- type types_Mapping = Mapping;
18
- type types_Push = Push;
19
- type types_Settings = Settings;
20
- type types_Types = Types;
21
- declare namespace types {
22
- export type { types_Env as Env, types_Mapping as Mapping, types_Push as Push, types_Settings as Settings, types_Types as Types };
23
- }
24
-
25
- declare const init: Env | undefined;
26
- declare const push: Env;
27
- /**
28
- * Simulation tracking paths
29
- */
30
- declare const simulation: string[];
31
-
32
- declare const env_init: typeof init;
33
- declare const env_push: typeof push;
34
- declare const env_simulation: typeof simulation;
35
- declare namespace env {
36
- export { env_init as init, env_push as push, env_simulation as simulation };
37
- }
38
-
39
- declare const index_env: typeof env;
40
- declare namespace index {
41
- export { index_env as env };
42
- }
43
-
44
- /**
45
- * Demo source for walkerOS
46
- *
47
- * Pushes configured events to the collector with optional delays.
48
- * Perfect for testing and demonstrations without external dependencies.
49
- */
50
- declare const sourceDemo: Source.Init<Types>;
51
-
52
- export { types as SourceDemo, sourceDemo as default, index as examples, sourceDemo };
package/dist/index.js DELETED
@@ -1 +0,0 @@
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
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
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":[]}
package/dist/index.mjs DELETED
@@ -1 +0,0 @@
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 +0,0 @@
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":[]}