@walkeros/source-demo 3.4.0 → 3.4.1-next-1776790594143
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.js +1 -1
- package/dist/dev.js.map +1 -1
- package/dist/dev.mjs +1 -1
- package/dist/dev.mjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/walkerOS.json +6 -2
- package/package.json +3 -3
package/dist/dev.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,t=Object.defineProperty,
|
|
1
|
+
"use strict";var e,t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,i=(e,o)=>{for(var r in o)t(e,r,{get:o[r],enumerable:!0})},n={};i(n,{examples:()=>m,schemas:()=>s}),module.exports=(e=n,((e,i,n,s)=>{if(i&&"object"==typeof i||"function"==typeof i)for(let l of r(i))a.call(e,l)||l===n||t(e,l,{get:()=>i[l],enumerable:!(s=o(i,l))||s.enumerable});return e})(t({},"__esModule",{value:!0}),e));var s={};i(s,{MappingSchema:()=>p,SettingsSchema:()=>d,mapping:()=>h,settings:()=>u});var l=require("@walkeros/core/dev"),c=require("@walkeros/core/dev"),d=c.z.object({events:c.z.array(c.z.object({delay:c.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,l.zodToSchema)(d),h=(0,l.zodToSchema)(p),m={};i(m,{env:()=>b,step:()=>O});var b={};i(b,{init:()=>y,push:()=>f,simulation:()=>j});var v=async()=>({ok:!0}),g=()=>{},w={error:g,warn:g,info:g,debug:g,throw:e=>{throw"string"==typeof e?new Error(e):e},json:g,scope:()=>w},y=void 0,f={push:v,command:v,elb:v,logger:w},j=["call:elb"],O={};i(O,{delayedEvent:()=>z,pageView:()=>P});var P={title:"Page view",description:"A simple event object is pushed through the demo source as a walker elb call for learning purposes.",in:{name:"page view",data:{title:"Home"}},out:[["elb",{name:"page view",data:{title:"Home"}}]]},z={title:"Delayed event",description:"An event object with a delay field is pushed through the demo source after the specified wait.",in:{name:"product add",data:{id:"abc",name:"Test Product"},delay:100},out:[["elb",{name:"product add",data:{id:"abc",name:"Test Product"}}]]};//# sourceMappingURL=dev.js.map
|
package/dist/dev.js.map
CHANGED
|
@@ -1 +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 [\n 'elb',\n {\n name: 'page view',\n data: { title: 'Home' },\n },\n ],\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 [\n 'elb',\n {\n name: 'product add',\n data: { id: 'abc', name: 'Test Product' },\n },\n ],\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;AAAA,MACE;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,MAAM,EAAE,OAAO,OAAO;AAAA,MACxB;AAAA,IACF;AAAA,EACF;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;AAAA,MACE;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,MAAM,EAAE,IAAI,OAAO,MAAM,eAAe;AAAA,MAC1C;AAAA,IACF;AAAA,EACF;AACF;","names":["import_dev","import_dev"]}
|
|
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 title: 'Page view',\n description:\n 'A simple event object is pushed through the demo source as a walker elb call for learning purposes.',\n in: {\n name: 'page view',\n data: { title: 'Home' },\n },\n out: [\n [\n 'elb',\n {\n name: 'page view',\n data: { title: 'Home' },\n },\n ],\n ],\n};\n\nexport const delayedEvent: Flow.StepExample = {\n title: 'Delayed event',\n description:\n 'An event object with a delay field is pushed through the demo source after the specified wait.',\n in: {\n name: 'product add',\n data: { id: 'abc', name: 'Test Product' },\n delay: 100,\n },\n out: [\n [\n 'elb',\n {\n name: 'product add',\n data: { id: 'abc', name: 'Test Product' },\n },\n ],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AK;AAAA,IACH;AAAA,MACE;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,MAAM,EAAE,OAAO,OAAO;AAAA,MACxB;AAAA,IACF;AAAA,EACF;AACF;AAEO,IAAM,eAAiC;AAAA,EAC5C,OAAO;AAAA,EACP,aACE;AAAA,EACF,IAAI;AAAA,IACF,MAAM;AAAA,IACN,MAAM,EAAE,IAAI,OAAO,MAAM,eAAe;AAAA,IACxC,OAAO;AAAA,EACT;AAAA,EACA,KAAK;AAAA,IACH;AAAA,MACE;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,MAAM,EAAE,IAAI,OAAO,MAAM,eAAe;AAAA,MAC1C;AAAA,IACF;AAAA,EACF;AACF;","names":["import_dev","import_dev"]}
|
package/dist/dev.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=Object.defineProperty,
|
|
1
|
+
var e=Object.defineProperty,t=(t,a)=>{for(var o in a)e(t,o,{get:a[o],enumerable:!0})},a={};t(a,{MappingSchema:()=>n,SettingsSchema:()=>i,mapping:()=>l,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 s}from"@walkeros/core/dev";var n=s.object({}),d=o(i),l=o(n),c={};t(c,{env:()=>p,step:()=>w});var p={};t(p,{init:()=>u,push:()=>b,simulation:()=>g});var m=async()=>({ok:!0}),h=()=>{},v={error:h,warn:h,info:h,debug:h,throw:e=>{throw"string"==typeof e?new Error(e):e},json:h,scope:()=>v},u=void 0,b={push:m,command:m,elb:m,logger:v},g=["call:elb"],w={};t(w,{delayedEvent:()=>y,pageView:()=>f});var f={title:"Page view",description:"A simple event object is pushed through the demo source as a walker elb call for learning purposes.",in:{name:"page view",data:{title:"Home"}},out:[["elb",{name:"page view",data:{title:"Home"}}]]},y={title:"Delayed event",description:"An event object with a delay field is pushed through the demo source after the specified wait.",in:{name:"product add",data:{id:"abc",name:"Test Product"},delay:100},out:[["elb",{name:"product add",data:{id:"abc",name:"Test Product"}}]]};export{c as examples,a as schemas};//# sourceMappingURL=dev.mjs.map
|
package/dist/dev.mjs.map
CHANGED
|
@@ -1 +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 [\n 'elb',\n {\n name: 'page view',\n data: { title: 'Home' },\n },\n ],\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 [\n 'elb',\n {\n name: 'product add',\n data: { id: 'abc', name: 'Test Product' },\n },\n ],\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;AAAA,MACE;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,MAAM,EAAE,OAAO,OAAO;AAAA,MACxB;AAAA,IACF;AAAA,EACF;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;AAAA,MACE;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,MAAM,EAAE,IAAI,OAAO,MAAM,eAAe;AAAA,MAC1C;AAAA,IACF;AAAA,EACF;AACF;","names":["z"]}
|
|
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 title: 'Page view',\n description:\n 'A simple event object is pushed through the demo source as a walker elb call for learning purposes.',\n in: {\n name: 'page view',\n data: { title: 'Home' },\n },\n out: [\n [\n 'elb',\n {\n name: 'page view',\n data: { title: 'Home' },\n },\n ],\n ],\n};\n\nexport const delayedEvent: Flow.StepExample = {\n title: 'Delayed event',\n description:\n 'An event object with a delay field is pushed through the demo source after the specified wait.',\n in: {\n name: 'product add',\n data: { id: 'abc', name: 'Test Product' },\n delay: 100,\n },\n out: [\n [\n 'elb',\n {\n name: 'product add',\n data: { id: 'abc', name: 'Test Product' },\n },\n ],\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,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H;AAAA,MACE;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,MAAM,EAAE,IAAI,OAAO,MAAM,eAAe;AAAA,MAC1C;AAAA,IACF;AAAA,EACF;AACF;","names":["z"]}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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:()=>
|
|
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:()=>w,examples:()=>d,sourceDemo:()=>y}),module.exports=(e=s,((e,n,s,i)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let d of a(n))r.call(e,d)||d===s||t(e,d,{get:()=>n[d],enumerable:!(i=o(n,d))||i.enumerable});return e})(t({},"__esModule",{value:!0}),e));var i={},d={};n(d,{env:()=>l,step:()=>v});var l={};n(l,{init:()=>m,push:()=>g,simulation:()=>b});var c=async()=>({ok:!0}),u=()=>{},p={error:u,warn:u,info:u,debug:u,throw:e=>{throw"string"==typeof e?new Error(e):e},json:u,scope:()=>p},m=void 0,g={push:c,command:c,elb:c,logger:p},b=["call:elb"],v={};n(v,{delayedEvent:()=>h,pageView:()=>f});var f={title:"Page view",description:"A simple event object is pushed through the demo source as a walker elb call for learning purposes.",in:{name:"page view",data:{title:"Home"}},out:[["elb",{name:"page view",data:{title:"Home"}}]]},h={title:"Delayed event",description:"An event object with a delay field is pushed through the demo source after the specified wait.",in:{name:"product add",data:{id:"abc",name:"Test Product"},delay:100},out:[["elb",{name:"product add",data:{id:"abc",name:"Test Product"}}]]},y=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}},w=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","../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 [\n 'elb',\n {\n name: 'page view',\n data: { title: 'Home' },\n },\n ],\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 [\n 'elb',\n {\n name: 'product add',\n data: { id: 'abc', name: 'Test Product' },\n },\n ],\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;AAAA,MACE;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,MAAM,EAAE,OAAO,OAAO;AAAA,MACxB;AAAA,IACF;AAAA,EACF;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;AAAA,MACE;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,MAAM,EAAE,IAAI,OAAO,MAAM,eAAe;AAAA,MAC1C;AAAA,IACF;AAAA,EACF;AACF;;;
|
|
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 title: 'Page view',\n description:\n 'A simple event object is pushed through the demo source as a walker elb call for learning purposes.',\n in: {\n name: 'page view',\n data: { title: 'Home' },\n },\n out: [\n [\n 'elb',\n {\n name: 'page view',\n data: { title: 'Home' },\n },\n ],\n ],\n};\n\nexport const delayedEvent: Flow.StepExample = {\n title: 'Delayed event',\n description:\n 'An event object with a delay field is pushed through the demo source after the specified wait.',\n in: {\n name: 'product add',\n data: { id: 'abc', name: 'Test Product' },\n delay: 100,\n },\n out: [\n [\n 'elb',\n {\n name: 'product add',\n data: { id: 'abc', name: 'Test Product' },\n },\n ],\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,U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AAG,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,a)=>{for(var
|
|
1
|
+
var e=Object.defineProperty,t=(t,a)=>{for(var o in a)e(t,o,{get:a[o],enumerable:!0})},a={},o={};t(o,{env:()=>n,step:()=>p});var n={};t(n,{init:()=>d,push:()=>l,simulation:()=>c});var i=async()=>({ok:!0}),r=()=>{},s={error:r,warn:r,info:r,debug:r,throw:e=>{throw"string"==typeof e?new Error(e):e},json:r,scope:()=>s},d=void 0,l={push:i,command:i,elb:i,logger:s},c=["call:elb"],p={};t(p,{delayedEvent:()=>m,pageView:()=>u});var u={title:"Page view",description:"A simple event object is pushed through the demo source as a walker elb call for learning purposes.",in:{name:"page view",data:{title:"Home"}},out:[["elb",{name:"page view",data:{title:"Home"}}]]},m={title:"Delayed event",description:"An event object with a delay field is pushed through the demo source after the specified wait.",in:{name:"product add",data:{id:"abc",name:"Test Product"},delay:100},out:[["elb",{name:"product add",data:{id:"abc",name:"Test Product"}}]]},g=async e=>{const{config:t,env:a}=e,{elb:o}=a,n={...t,settings:t?.settings||{events:[]}};return(n.settings?.events||[]).forEach(e=>{const{delay:t,...a}=e;setTimeout(()=>o(a),t||0)}),{type:"demo",config:n,push:o}},v=g;export{a as SourceDemo,v as default,o as examples,g as sourceDemo};//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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 [\n 'elb',\n {\n name: 'page view',\n data: { title: 'Home' },\n },\n ],\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 [\n 'elb',\n {\n name: 'product add',\n data: { id: 'abc', name: 'Test Product' },\n },\n ],\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;AAAA,MACE;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,MAAM,EAAE,OAAO,OAAO;AAAA,MACxB;AAAA,IACF;AAAA,EACF;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;AAAA,MACE;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,MAAM,EAAE,IAAI,OAAO,MAAM,eAAe;AAAA,MAC1C;AAAA,IACF;AAAA,EACF;AACF;;;
|
|
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 title: 'Page view',\n description:\n 'A simple event object is pushed through the demo source as a walker elb call for learning purposes.',\n in: {\n name: 'page view',\n data: { title: 'Home' },\n },\n out: [\n [\n 'elb',\n {\n name: 'page view',\n data: { title: 'Home' },\n },\n ],\n ],\n};\n\nexport const delayedEvent: Flow.StepExample = {\n title: 'Delayed event',\n description:\n 'An event object with a delay field is pushed through the demo source after the specified wait.',\n in: {\n name: 'product add',\n data: { id: 'abc', name: 'Test Product' },\n delay: 100,\n },\n out: [\n [\n 'elb',\n {\n name: 'product add',\n data: { id: 'abc', name: 'Test Product' },\n },\n ],\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,OAAO;AAAA,EACP,aACE;AAAA,EACF,IAAI;AAAA,IACF,MAAM;AAAA,IACN,MAAM,EAAE,OAAO,OAAO;AAAA,EACxB;AAAA,EACA,KAAK;AAAA,IACH;AAAA,MACE;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,MAAM,EAAE,OAAO,OAAO;AAAA,MACxB;AAAA,IACF;AAAA,EACF;AACF;AAEO,IAAM,eAAiC;AAAA,EAC5C,OAAO;AAAA,EACP,aACE;AAAA,EACF,IAAI;AAAA,IACF,MAAM;AAAA,IACN,MAAM,EAAE,IAAI,OAAO,MAAM,eAAe;AAAA,IACxC,OAAO;AAAA,EACT;AAAA,EACA,KAAK;AAAA,IACH;AAAA,MACE;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,MAAM,EAAE,IAAI,OAAO,MAAM,eAAe;AAAA,MAC1C;AAAA,IACF;AAAA,EACF;AACF;;;AC3BO,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/walkerOS.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$meta": {
|
|
3
3
|
"package": "@walkeros/source-demo",
|
|
4
|
-
"version": "3.4.
|
|
4
|
+
"version": "3.4.1-next-1776790594143",
|
|
5
5
|
"type": "source",
|
|
6
6
|
"platform": [
|
|
7
7
|
"web",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"$code": "()=>{}"
|
|
75
75
|
},
|
|
76
76
|
"scope": {
|
|
77
|
-
"$code": "()=>
|
|
77
|
+
"$code": "()=>v"
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
},
|
|
@@ -84,6 +84,8 @@
|
|
|
84
84
|
},
|
|
85
85
|
"step": {
|
|
86
86
|
"delayedEvent": {
|
|
87
|
+
"title": "Delayed event",
|
|
88
|
+
"description": "An event object with a delay field is pushed through the demo source after the specified wait.",
|
|
87
89
|
"in": {
|
|
88
90
|
"name": "product add",
|
|
89
91
|
"data": {
|
|
@@ -106,6 +108,8 @@
|
|
|
106
108
|
]
|
|
107
109
|
},
|
|
108
110
|
"pageView": {
|
|
111
|
+
"title": "Page view",
|
|
112
|
+
"description": "A simple event object is pushed through the demo source as a walker elb call for learning purposes.",
|
|
109
113
|
"in": {
|
|
110
114
|
"name": "page view",
|
|
111
115
|
"data": {
|
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": "3.4.
|
|
4
|
+
"version": "3.4.1-next-1776790594143",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.mjs",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"test": "jest"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@walkeros/core": "3.4.
|
|
41
|
+
"@walkeros/core": "3.4.1-next-1776790594143"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@walkeros/collector": "3.4.
|
|
44
|
+
"@walkeros/collector": "3.4.1-next-1776790594143"
|
|
45
45
|
},
|
|
46
46
|
"repository": {
|
|
47
47
|
"url": "git+https://github.com/elbwalker/walkerOS.git",
|