@walkeros/source-demo 2.0.0 → 2.1.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/dist/dev.d.mts ADDED
@@ -0,0 +1,61 @@
1
+ import * as _walkeros_core_dev from '@walkeros/core/dev';
2
+ import { z } from '@walkeros/core/dev';
3
+ import { Source, Elb, Flow } from '@walkeros/core';
4
+
5
+ declare const SettingsSchema: z.ZodObject<{
6
+ events: z.ZodArray<z.ZodObject<{
7
+ delay: z.ZodOptional<z.ZodNumber>;
8
+ }, z.core.$loose>>;
9
+ }, z.core.$strip>;
10
+ type Settings = z.infer<typeof SettingsSchema>;
11
+
12
+ declare const MappingSchema: z.ZodObject<{}, z.core.$strip>;
13
+ type Mapping = z.infer<typeof MappingSchema>;
14
+
15
+ declare const settings: _walkeros_core_dev.JSONSchema;
16
+ declare const mapping: _walkeros_core_dev.JSONSchema;
17
+
18
+ type index$1_Mapping = Mapping;
19
+ declare const index$1_MappingSchema: typeof MappingSchema;
20
+ type index$1_Settings = Settings;
21
+ declare const index$1_SettingsSchema: typeof SettingsSchema;
22
+ declare const index$1_mapping: typeof mapping;
23
+ declare const index$1_settings: typeof settings;
24
+ declare namespace index$1 {
25
+ export { type index$1_Mapping as Mapping, index$1_MappingSchema as MappingSchema, type index$1_Settings as Settings, index$1_SettingsSchema as SettingsSchema, index$1_mapping as mapping, index$1_settings as settings };
26
+ }
27
+
28
+ interface Env extends Source.BaseEnv {
29
+ elb: Elb.Fn;
30
+ }
31
+
32
+ declare const init: Env | undefined;
33
+ declare const push: Env;
34
+ /**
35
+ * Simulation tracking paths
36
+ */
37
+ declare const simulation: string[];
38
+
39
+ declare const env_init: typeof init;
40
+ declare const env_push: typeof push;
41
+ declare const env_simulation: typeof simulation;
42
+ declare namespace env {
43
+ export { env_init as init, env_push as push, env_simulation as simulation };
44
+ }
45
+
46
+ declare const pageView: Flow.StepExample;
47
+ declare const delayedEvent: Flow.StepExample;
48
+
49
+ declare const step_delayedEvent: typeof delayedEvent;
50
+ declare const step_pageView: typeof pageView;
51
+ declare namespace step {
52
+ export { step_delayedEvent as delayedEvent, step_pageView as pageView };
53
+ }
54
+
55
+ declare const index_env: typeof env;
56
+ declare const index_step: typeof step;
57
+ declare namespace index {
58
+ export { index_env as env, index_step as step };
59
+ }
60
+
61
+ export { index as examples, index$1 as schemas };
package/dist/dev.d.ts ADDED
@@ -0,0 +1,61 @@
1
+ import * as _walkeros_core_dev from '@walkeros/core/dev';
2
+ import { z } from '@walkeros/core/dev';
3
+ import { Source, Elb, Flow } from '@walkeros/core';
4
+
5
+ declare const SettingsSchema: z.ZodObject<{
6
+ events: z.ZodArray<z.ZodObject<{
7
+ delay: z.ZodOptional<z.ZodNumber>;
8
+ }, z.core.$loose>>;
9
+ }, z.core.$strip>;
10
+ type Settings = z.infer<typeof SettingsSchema>;
11
+
12
+ declare const MappingSchema: z.ZodObject<{}, z.core.$strip>;
13
+ type Mapping = z.infer<typeof MappingSchema>;
14
+
15
+ declare const settings: _walkeros_core_dev.JSONSchema;
16
+ declare const mapping: _walkeros_core_dev.JSONSchema;
17
+
18
+ type index$1_Mapping = Mapping;
19
+ declare const index$1_MappingSchema: typeof MappingSchema;
20
+ type index$1_Settings = Settings;
21
+ declare const index$1_SettingsSchema: typeof SettingsSchema;
22
+ declare const index$1_mapping: typeof mapping;
23
+ declare const index$1_settings: typeof settings;
24
+ declare namespace index$1 {
25
+ export { type index$1_Mapping as Mapping, index$1_MappingSchema as MappingSchema, type index$1_Settings as Settings, index$1_SettingsSchema as SettingsSchema, index$1_mapping as mapping, index$1_settings as settings };
26
+ }
27
+
28
+ interface Env extends Source.BaseEnv {
29
+ elb: Elb.Fn;
30
+ }
31
+
32
+ declare const init: Env | undefined;
33
+ declare const push: Env;
34
+ /**
35
+ * Simulation tracking paths
36
+ */
37
+ declare const simulation: string[];
38
+
39
+ declare const env_init: typeof init;
40
+ declare const env_push: typeof push;
41
+ declare const env_simulation: typeof simulation;
42
+ declare namespace env {
43
+ export { env_init as init, env_push as push, env_simulation as simulation };
44
+ }
45
+
46
+ declare const pageView: Flow.StepExample;
47
+ declare const delayedEvent: Flow.StepExample;
48
+
49
+ declare const step_delayedEvent: typeof delayedEvent;
50
+ declare const step_pageView: typeof pageView;
51
+ declare namespace step {
52
+ export { step_delayedEvent as delayedEvent, step_pageView as pageView };
53
+ }
54
+
55
+ declare const index_env: typeof env;
56
+ declare const index_step: typeof step;
57
+ declare namespace index {
58
+ export { index_env as env, index_step as step };
59
+ }
60
+
61
+ export { index as examples, index$1 as schemas };
package/dist/dev.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";var e,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,n=(e,r)=>{for(var a in r)t(e,a,{get:r[a],enumerable:!0})},i={};n(i,{examples:()=>b,schemas:()=>s}),module.exports=(e=i,((e,n,i,s)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let c of a(n))o.call(e,c)||c===i||t(e,c,{get:()=>n[c],enumerable:!(s=r(n,c))||s.enumerable});return e})(t({},"__esModule",{value:!0}),e));var s={};n(s,{MappingSchema:()=>p,SettingsSchema:()=>l,mapping:()=>m,settings:()=>u});var c=require("@walkeros/core/dev"),d=require("@walkeros/core/dev"),l=d.z.object({events:d.z.array(d.z.object({delay:d.z.number().optional().describe("Milliseconds to wait before pushing this event")}).passthrough().describe("Partial walkerOS event with optional delay")).describe("Events to push to the collector on init")}),p=require("@walkeros/core/dev").z.object({}),u=(0,c.zodToSchema)(l),m=(0,c.zodToSchema)(p),b={};n(b,{env:()=>v,step:()=>O});var v={};n(v,{init:()=>y,push:()=>f,simulation:()=>j});var g=async()=>({ok:!0}),h=()=>{},w={error:h,warn:h,info:h,debug:h,throw:e=>{throw"string"==typeof e?new Error(e):e},json:h,scope:()=>w},y=void 0,f={push:g,command:g,elb:g,logger:w},j=["call:elb"],O={};n(O,{delayedEvent:()=>P,pageView:()=>z});var z={in:{name:"page view",data:{title:"Home"}},out:{name:"page view",data:{title:"Home"}}},P={in:{name:"product add",data:{id:"abc",name:"Test Product"},delay:100},out:{name:"product add",data:{id:"abc",name:"Test Product"}}};//# sourceMappingURL=dev.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/dev.ts","../src/schemas/index.ts","../src/schemas/settings.ts","../src/schemas/mapping.ts","../src/examples/index.ts","../src/examples/env.ts","../src/examples/step.ts"],"sourcesContent":["export * as schemas from './schemas';\nexport * as examples from './examples';\n","import { zodToSchema } from '@walkeros/core/dev';\nimport { SettingsSchema } from './settings';\nimport { MappingSchema } from './mapping';\n\nexport { SettingsSchema, type Settings } from './settings';\nexport { MappingSchema, type Mapping } from './mapping';\n\n// JSON Schema\nexport const settings = zodToSchema(SettingsSchema);\nexport const mapping = zodToSchema(MappingSchema);\n","import { z } from '@walkeros/core/dev';\n\nexport const SettingsSchema = z.object({\n events: z\n .array(\n z\n .object({\n delay: z\n .number()\n .optional()\n .describe('Milliseconds to wait before pushing this event'),\n })\n .passthrough()\n .describe('Partial walkerOS event with optional delay'),\n )\n .describe('Events to push to the collector on init'),\n});\n\nexport type Settings = z.infer<typeof SettingsSchema>;\n","import { z } from '@walkeros/core/dev';\n\nexport const MappingSchema = z.object({});\n\nexport type Mapping = z.infer<typeof MappingSchema>;\n","export * as env from './env';\nexport * as step from './step';\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 warn: noopFn,\n info: noopFn,\n debug: noopFn,\n throw: (message: string | Error) => {\n throw typeof message === 'string' ? new Error(message) : message;\n },\n json: noopFn,\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 { Flow } from '@walkeros/core';\n\nexport const pageView: Flow.StepExample = {\n in: {\n name: 'page view',\n data: { title: 'Home' },\n },\n out: {\n name: 'page view',\n data: { title: 'Home' },\n },\n};\n\nexport const delayedEvent: Flow.StepExample = {\n in: {\n name: 'product add',\n data: { id: 'abc', name: 'Test Product' },\n delay: 100,\n },\n out: {\n name: 'product add',\n data: { id: 'abc', name: 'Test Product' },\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,cAA4B;;;ACA5B,iBAAkB;AAEX,IAAM,iBAAiB,aAAE,OAAO;AAAA,EACrC,QAAQ,aACL;AAAA,IACC,aACG,OAAO;AAAA,MACN,OAAO,aACJ,OAAO,EACP,SAAS,EACT,SAAS,gDAAgD;AAAA,IAC9D,CAAC,EACA,YAAY,EACZ,SAAS,4CAA4C;AAAA,EAC1D,EACC,SAAS,yCAAyC;AACvD,CAAC;;;AChBD,IAAAC,cAAkB;AAEX,IAAM,gBAAgB,cAAE,OAAO,CAAC,CAAC;;;AFMjC,IAAM,eAAW,yBAAY,cAAc;AAC3C,IAAM,cAAU,yBAAY,aAAa;;;AGThD;AAAA;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,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO,CAAC,YAA4B;AAClC,UAAM,OAAO,YAAY,WAAW,IAAI,MAAM,OAAO,IAAI;AAAA,EAC3D;AAAA,EACA,MAAM;AAAA,EACN,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;;;ACrCrC;AAAA;AAAA;AAAA;AAAA;AAEO,IAAM,WAA6B;AAAA,EACxC,IAAI;AAAA,IACF,MAAM;AAAA,IACN,MAAM,EAAE,OAAO,OAAO;AAAA,EACxB;AAAA,EACA,KAAK;AAAA,IACH,MAAM;AAAA,IACN,MAAM,EAAE,OAAO,OAAO;AAAA,EACxB;AACF;AAEO,IAAM,eAAiC;AAAA,EAC5C,IAAI;AAAA,IACF,MAAM;AAAA,IACN,MAAM,EAAE,IAAI,OAAO,MAAM,eAAe;AAAA,IACxC,OAAO;AAAA,EACT;AAAA,EACA,KAAK;AAAA,IACH,MAAM;AAAA,IACN,MAAM,EAAE,IAAI,OAAO,MAAM,eAAe;AAAA,EAC1C;AACF;","names":["import_dev","import_dev"]}
package/dist/dev.mjs ADDED
@@ -0,0 +1 @@
1
+ var e=Object.defineProperty,a=(a,t)=>{for(var o in t)e(a,o,{get:t[o],enumerable:!0})},t={};a(t,{MappingSchema:()=>s,SettingsSchema:()=>i,mapping:()=>c,settings:()=>d});import{zodToSchema as o}from"@walkeros/core/dev";import{z as r}from"@walkeros/core/dev";var i=r.object({events:r.array(r.object({delay:r.number().optional().describe("Milliseconds to wait before pushing this event")}).passthrough().describe("Partial walkerOS event with optional delay")).describe("Events to push to the collector on init")});import{z as n}from"@walkeros/core/dev";var s=n.object({}),d=o(i),c=o(s),l={};a(l,{env:()=>p,step:()=>w});var p={};a(p,{init:()=>u,push:()=>g,simulation:()=>h});var m=async()=>({ok:!0}),v=()=>{},b={error:v,warn:v,info:v,debug:v,throw:e=>{throw"string"==typeof e?new Error(e):e},json:v,scope:()=>b},u=void 0,g={push:m,command:m,elb:m,logger:b},h=["call:elb"],w={};a(w,{delayedEvent:()=>y,pageView:()=>f});var f={in:{name:"page view",data:{title:"Home"}},out:{name:"page view",data:{title:"Home"}}},y={in:{name:"product add",data:{id:"abc",name:"Test Product"},delay:100},out:{name:"product add",data:{id:"abc",name:"Test Product"}}};export{l as examples,t as schemas};//# sourceMappingURL=dev.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/schemas/index.ts","../src/schemas/settings.ts","../src/schemas/mapping.ts","../src/examples/index.ts","../src/examples/env.ts","../src/examples/step.ts"],"sourcesContent":["import { zodToSchema } from '@walkeros/core/dev';\nimport { SettingsSchema } from './settings';\nimport { MappingSchema } from './mapping';\n\nexport { SettingsSchema, type Settings } from './settings';\nexport { MappingSchema, type Mapping } from './mapping';\n\n// JSON Schema\nexport const settings = zodToSchema(SettingsSchema);\nexport const mapping = zodToSchema(MappingSchema);\n","import { z } from '@walkeros/core/dev';\n\nexport const SettingsSchema = z.object({\n events: z\n .array(\n z\n .object({\n delay: z\n .number()\n .optional()\n .describe('Milliseconds to wait before pushing this event'),\n })\n .passthrough()\n .describe('Partial walkerOS event with optional delay'),\n )\n .describe('Events to push to the collector on init'),\n});\n\nexport type Settings = z.infer<typeof SettingsSchema>;\n","import { z } from '@walkeros/core/dev';\n\nexport const MappingSchema = z.object({});\n\nexport type Mapping = z.infer<typeof MappingSchema>;\n","export * as env from './env';\nexport * as step from './step';\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 warn: noopFn,\n info: noopFn,\n debug: noopFn,\n throw: (message: string | Error) => {\n throw typeof message === 'string' ? new Error(message) : message;\n },\n json: noopFn,\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 { Flow } from '@walkeros/core';\n\nexport const pageView: Flow.StepExample = {\n in: {\n name: 'page view',\n data: { title: 'Home' },\n },\n out: {\n name: 'page view',\n data: { title: 'Home' },\n },\n};\n\nexport const delayedEvent: Flow.StepExample = {\n in: {\n name: 'product add',\n data: { id: 'abc', name: 'Test Product' },\n delay: 100,\n },\n out: {\n name: 'product add',\n data: { id: 'abc', name: 'Test Product' },\n },\n};\n"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAS,mBAAmB;;;ACA5B,SAAS,SAAS;AAEX,IAAM,iBAAiB,EAAE,OAAO;AAAA,EACrC,QAAQ,EACL;AAAA,IACC,EACG,OAAO;AAAA,MACN,OAAO,EACJ,OAAO,EACP,SAAS,EACT,SAAS,gDAAgD;AAAA,IAC9D,CAAC,EACA,YAAY,EACZ,SAAS,4CAA4C;AAAA,EAC1D,EACC,SAAS,yCAAyC;AACvD,CAAC;;;AChBD,SAAS,KAAAA,UAAS;AAEX,IAAM,gBAAgBA,GAAE,OAAO,CAAC,CAAC;;;AFMjC,IAAM,WAAW,YAAY,cAAc;AAC3C,IAAM,UAAU,YAAY,aAAa;;;AGThD;AAAA;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,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO,CAAC,YAA4B;AAClC,UAAM,OAAO,YAAY,WAAW,IAAI,MAAM,OAAO,IAAI;AAAA,EAC3D;AAAA,EACA,MAAM;AAAA,EACN,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;;;ACrCrC;AAAA;AAAA;AAAA;AAAA;AAEO,IAAM,WAA6B;AAAA,EACxC,IAAI;AAAA,IACF,MAAM;AAAA,IACN,MAAM,EAAE,OAAO,OAAO;AAAA,EACxB;AAAA,EACA,KAAK;AAAA,IACH,MAAM;AAAA,IACN,MAAM,EAAE,OAAO,OAAO;AAAA,EACxB;AACF;AAEO,IAAM,eAAiC;AAAA,EAC5C,IAAI;AAAA,IACF,MAAM;AAAA,IACN,MAAM,EAAE,IAAI,OAAO,MAAM,eAAe;AAAA,IACxC,OAAO;AAAA,EACT;AAAA,EACA,KAAK;AAAA,IACH,MAAM;AAAA,IACN,MAAM,EAAE,IAAI,OAAO,MAAM,eAAe;AAAA,EAC1C;AACF;","names":["z"]}
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { Source, WalkerOS, Elb } from '@walkeros/core';
1
+ import { Source, Elb, WalkerOS, Flow } from '@walkeros/core';
2
2
 
3
3
  interface Settings {
4
4
  events: Array<WalkerOS.PartialEvent & {
@@ -36,9 +36,19 @@ declare namespace env {
36
36
  export { env_init as init, env_push as push, env_simulation as simulation };
37
37
  }
38
38
 
39
+ declare const pageView: Flow.StepExample;
40
+ declare const delayedEvent: Flow.StepExample;
41
+
42
+ declare const step_delayedEvent: typeof delayedEvent;
43
+ declare const step_pageView: typeof pageView;
44
+ declare namespace step {
45
+ export { step_delayedEvent as delayedEvent, step_pageView as pageView };
46
+ }
47
+
39
48
  declare const index_env: typeof env;
49
+ declare const index_step: typeof step;
40
50
  declare namespace index {
41
- export { index_env as env };
51
+ export { index_env as env, index_step as step };
42
52
  }
43
53
 
44
54
  /**
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Source, WalkerOS, Elb } from '@walkeros/core';
1
+ import { Source, Elb, WalkerOS, Flow } from '@walkeros/core';
2
2
 
3
3
  interface Settings {
4
4
  events: Array<WalkerOS.PartialEvent & {
@@ -36,9 +36,19 @@ declare namespace env {
36
36
  export { env_init as init, env_push as push, env_simulation as simulation };
37
37
  }
38
38
 
39
+ declare const pageView: Flow.StepExample;
40
+ declare const delayedEvent: Flow.StepExample;
41
+
42
+ declare const step_delayedEvent: typeof delayedEvent;
43
+ declare const step_pageView: typeof pageView;
44
+ declare namespace step {
45
+ export { step_delayedEvent as delayedEvent, step_pageView as pageView };
46
+ }
47
+
39
48
  declare const index_env: typeof env;
49
+ declare const index_step: typeof step;
40
50
  declare namespace index {
41
- export { index_env as env };
51
+ export { index_env as env, index_step as step };
42
52
  }
43
53
 
44
54
  /**
package/dist/index.js CHANGED
@@ -1 +1 @@
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
1
+ "use strict";var e,t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,n=(e,o)=>{for(var a in o)t(e,a,{get:o[a],enumerable:!0})},s={};n(s,{SourceDemo:()=>i,default:()=>h,examples:()=>c,sourceDemo:()=>w}),module.exports=(e=s,((e,n,s,i)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let c of a(n))r.call(e,c)||c===s||t(e,c,{get:()=>n[c],enumerable:!(i=o(n,c))||i.enumerable});return e})(t({},"__esModule",{value:!0}),e));var i={},c={};n(c,{env:()=>d,step:()=>b});var d={};n(d,{init:()=>m,push:()=>g,simulation:()=>v});var u=async()=>({ok:!0}),l=()=>{},p={error:l,warn:l,info:l,debug:l,throw:e=>{throw"string"==typeof e?new Error(e):e},json:l,scope:()=>p},m=void 0,g={push:u,command:u,elb:u,logger:p},v=["call:elb"],b={};n(b,{delayedEvent:()=>y,pageView:()=>f});var f={in:{name:"page view",data:{title:"Home"}},out:{name:"page view",data:{title:"Home"}}},y={in:{name:"product add",data:{id:"abc",name:"Test Product"},delay:100},out:{name:"product add",data:{id:"abc",name:"Test Product"}}},w=async e=>{const{config:t,env:o}=e,{elb:a}=o,r={...t,settings:t?.settings||{events:[]}};return(r.settings?.events||[]).forEach(e=>{const{delay:t,...o}=e;setTimeout(()=>a(o),t||0)}),{type:"demo",config:r,push:a}},h=w;//# 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 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":[]}
1
+ {"version":3,"sources":["../src/index.ts","../src/types.ts","../src/examples/index.ts","../src/examples/env.ts","../src/examples/step.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';\nexport * as step from './step';\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 warn: noopFn,\n info: noopFn,\n debug: noopFn,\n throw: (message: string | Error) => {\n throw typeof message === 'string' ? new Error(message) : message;\n },\n json: noopFn,\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 { Flow } from '@walkeros/core';\n\nexport const pageView: Flow.StepExample = {\n in: {\n name: 'page view',\n data: { title: 'Home' },\n },\n out: {\n name: 'page view',\n data: { title: 'Home' },\n },\n};\n\nexport const delayedEvent: Flow.StepExample = {\n in: {\n name: 'product add',\n data: { id: 'abc', name: 'Test Product' },\n delay: 100,\n },\n out: {\n name: 'product add',\n data: { id: 'abc', name: 'Test Product' },\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;;;ACAA;AAAA;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,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO,CAAC,YAA4B;AAClC,UAAM,OAAO,YAAY,WAAW,IAAI,MAAM,OAAO,IAAI;AAAA,EAC3D;AAAA,EACA,MAAM;AAAA,EACN,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;;;ACrCrC;AAAA;AAAA;AAAA;AAAA;AAEO,IAAM,WAA6B;AAAA,EACxC,IAAI;AAAA,IACF,MAAM;AAAA,IACN,MAAM,EAAE,OAAO,OAAO;AAAA,EACxB;AAAA,EACA,KAAK;AAAA,IACH,MAAM;AAAA,IACN,MAAM,EAAE,OAAO,OAAO;AAAA,EACxB;AACF;AAEO,IAAM,eAAiC;AAAA,EAC5C,IAAI;AAAA,IACF,MAAM;AAAA,IACN,MAAM,EAAE,IAAI,OAAO,MAAM,eAAe;AAAA,IACxC,OAAO;AAAA,EACT;AAAA,EACA,KAAK;AAAA,IACH,MAAM;AAAA,IACN,MAAM,EAAE,IAAI,OAAO,MAAM,eAAe;AAAA,EAC1C;AACF;;;AJXO,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,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
+ var e=Object.defineProperty,t=(t,a)=>{for(var n in a)e(t,n,{get:a[n],enumerable:!0})},a={},n={};t(n,{env:()=>o,step:()=>u});var o={};t(o,{init:()=>i,push:()=>c,simulation:()=>m});var r=async()=>({ok:!0}),s=()=>{},d={error:s,warn:s,info:s,debug:s,throw:e=>{throw"string"==typeof e?new Error(e):e},json:s,scope:()=>d},i=void 0,c={push:r,command:r,elb:r,logger:d},m=["call:elb"],u={};t(u,{delayedEvent:()=>p,pageView:()=>l});var l={in:{name:"page view",data:{title:"Home"}},out:{name:"page view",data:{title:"Home"}}},p={in:{name:"product add",data:{id:"abc",name:"Test Product"},delay:100},out:{name:"product add",data:{id:"abc",name:"Test Product"}}},g=async e=>{const{config:t,env:a}=e,{elb:n}=a,o={...t,settings:t?.settings||{events:[]}};return(o.settings?.events||[]).forEach(e=>{const{delay:t,...a}=e;setTimeout(()=>n(a),t||0)}),{type:"demo",config:o,push:n}},v=g;export{a as SourceDemo,v as default,n as examples,g 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});\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":[]}
1
+ {"version":3,"sources":["../src/types.ts","../src/examples/index.ts","../src/examples/env.ts","../src/examples/step.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';\nexport * as step from './step';\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 warn: noopFn,\n info: noopFn,\n debug: noopFn,\n throw: (message: string | Error) => {\n throw typeof message === 'string' ? new Error(message) : message;\n },\n json: noopFn,\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 { Flow } from '@walkeros/core';\n\nexport const pageView: Flow.StepExample = {\n in: {\n name: 'page view',\n data: { title: 'Home' },\n },\n out: {\n name: 'page view',\n data: { title: 'Home' },\n },\n};\n\nexport const delayedEvent: Flow.StepExample = {\n in: {\n name: 'product add',\n data: { id: 'abc', name: 'Test Product' },\n delay: 100,\n },\n out: {\n name: 'product add',\n data: { id: 'abc', name: 'Test Product' },\n },\n};\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;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,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO,CAAC,YAA4B;AAClC,UAAM,OAAO,YAAY,WAAW,IAAI,MAAM,OAAO,IAAI;AAAA,EAC3D;AAAA,EACA,MAAM;AAAA,EACN,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;;;ACrCrC;AAAA;AAAA;AAAA;AAAA;AAEO,IAAM,WAA6B;AAAA,EACxC,IAAI;AAAA,IACF,MAAM;AAAA,IACN,MAAM,EAAE,OAAO,OAAO;AAAA,EACxB;AAAA,EACA,KAAK;AAAA,IACH,MAAM;AAAA,IACN,MAAM,EAAE,OAAO,OAAO;AAAA,EACxB;AACF;AAEO,IAAM,eAAiC;AAAA,EAC5C,IAAI;AAAA,IACF,MAAM;AAAA,IACN,MAAM,EAAE,IAAI,OAAO,MAAM,eAAe;AAAA,IACxC,OAAO;AAAA,EACT;AAAA,EACA,KAAK;AAAA,IACH,MAAM;AAAA,IACN,MAAM,EAAE,IAAI,OAAO,MAAM,eAAe;AAAA,EAC1C;AACF;;;ACXO,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":[]}
@@ -0,0 +1,114 @@
1
+ {
2
+ "$meta": {
3
+ "package": "@walkeros/source-demo",
4
+ "version": "2.0.0",
5
+ "type": "source"
6
+ },
7
+ "schemas": {
8
+ "mapping": {
9
+ "$schema": "http://json-schema.org/draft-07/schema#",
10
+ "type": "object",
11
+ "properties": {},
12
+ "additionalProperties": false
13
+ },
14
+ "settings": {
15
+ "$schema": "http://json-schema.org/draft-07/schema#",
16
+ "type": "object",
17
+ "properties": {
18
+ "events": {
19
+ "type": "array",
20
+ "items": {
21
+ "type": "object",
22
+ "properties": {
23
+ "delay": {
24
+ "description": "Milliseconds to wait before pushing this event",
25
+ "type": "number"
26
+ }
27
+ },
28
+ "additionalProperties": {},
29
+ "description": "Partial walkerOS event with optional delay"
30
+ },
31
+ "description": "Events to push to the collector on init"
32
+ }
33
+ },
34
+ "required": [
35
+ "events"
36
+ ],
37
+ "additionalProperties": false
38
+ }
39
+ },
40
+ "examples": {
41
+ "env": {
42
+ "push": {
43
+ "push": {
44
+ "$code": "async()=>({ok:!0})"
45
+ },
46
+ "command": {
47
+ "$code": "async()=>({ok:!0})"
48
+ },
49
+ "elb": {
50
+ "$code": "async()=>({ok:!0})"
51
+ },
52
+ "logger": {
53
+ "error": {
54
+ "$code": "()=>{}"
55
+ },
56
+ "warn": {
57
+ "$code": "()=>{}"
58
+ },
59
+ "info": {
60
+ "$code": "()=>{}"
61
+ },
62
+ "debug": {
63
+ "$code": "()=>{}"
64
+ },
65
+ "throw": {
66
+ "$code": "e=>{throw\"string\"==typeof e?new Error(e):e}"
67
+ },
68
+ "json": {
69
+ "$code": "()=>{}"
70
+ },
71
+ "scope": {
72
+ "$code": "()=>b"
73
+ }
74
+ }
75
+ },
76
+ "simulation": [
77
+ "call:elb"
78
+ ]
79
+ },
80
+ "step": {
81
+ "delayedEvent": {
82
+ "in": {
83
+ "name": "product add",
84
+ "data": {
85
+ "id": "abc",
86
+ "name": "Test Product"
87
+ },
88
+ "delay": 100
89
+ },
90
+ "out": {
91
+ "name": "product add",
92
+ "data": {
93
+ "id": "abc",
94
+ "name": "Test Product"
95
+ }
96
+ }
97
+ },
98
+ "pageView": {
99
+ "in": {
100
+ "name": "page view",
101
+ "data": {
102
+ "title": "Home"
103
+ }
104
+ },
105
+ "out": {
106
+ "name": "page view",
107
+ "data": {
108
+ "title": "Home"
109
+ }
110
+ }
111
+ }
112
+ }
113
+ }
114
+ }
package/package.json CHANGED
@@ -1,16 +1,24 @@
1
1
  {
2
2
  "name": "@walkeros/source-demo",
3
3
  "description": "Demo source for walkerOS - generates events from config",
4
- "version": "2.0.0",
4
+ "version": "2.1.0",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.mjs",
8
8
  "types": "./dist/index.d.ts",
9
+ "walkerOS": {
10
+ "type": "source"
11
+ },
9
12
  "exports": {
10
13
  ".": {
11
14
  "types": "./dist/index.d.ts",
12
15
  "import": "./dist/index.mjs",
13
16
  "require": "./dist/index.js"
17
+ },
18
+ "./dev": {
19
+ "types": "./dist/dev.d.ts",
20
+ "import": "./dist/dev.mjs",
21
+ "require": "./dist/dev.js"
14
22
  }
15
23
  },
16
24
  "files": [
@@ -25,14 +33,14 @@
25
33
  "test": "jest"
26
34
  },
27
35
  "dependencies": {
28
- "@walkeros/core": "^2.0.0"
36
+ "@walkeros/core": "^2.1.0"
29
37
  },
30
38
  "devDependencies": {
31
- "@walkeros/collector": "^2.0.0"
39
+ "@walkeros/collector": "^2.1.0"
32
40
  },
33
41
  "repository": {
34
42
  "url": "git+https://github.com/elbwalker/walkerOS.git",
35
- "directory": "apps/demos/source"
43
+ "directory": "packages/web/sources/demo"
36
44
  },
37
45
  "author": "elbwalker <hello@elbwalker.com>",
38
46
  "homepage": "https://github.com/elbwalker/walkerOS#readme",