@walkeros/source-demo 3.4.2 → 4.0.0-next-1777463920154
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 +8 -0
- package/dist/dev.d.ts +8 -0
- package/dist/index.d.mts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/walkerOS.json +1 -1
- package/package.json +3 -3
package/dist/dev.d.mts
CHANGED
|
@@ -25,6 +25,14 @@ declare namespace index$1 {
|
|
|
25
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
26
|
}
|
|
27
27
|
|
|
28
|
+
declare module '@walkeros/core' {
|
|
29
|
+
interface SourceMap {
|
|
30
|
+
demo: {
|
|
31
|
+
type: 'demo';
|
|
32
|
+
platform?: 'web';
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
28
36
|
interface Env extends Source.BaseEnv {
|
|
29
37
|
elb: Elb.Fn;
|
|
30
38
|
}
|
package/dist/dev.d.ts
CHANGED
|
@@ -25,6 +25,14 @@ declare namespace index$1 {
|
|
|
25
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
26
|
}
|
|
27
27
|
|
|
28
|
+
declare module '@walkeros/core' {
|
|
29
|
+
interface SourceMap {
|
|
30
|
+
demo: {
|
|
31
|
+
type: 'demo';
|
|
32
|
+
platform?: 'web';
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
28
36
|
interface Env extends Source.BaseEnv {
|
|
29
37
|
elb: Elb.Fn;
|
|
30
38
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { Source, Elb, WalkerOS, Flow } from '@walkeros/core';
|
|
2
2
|
|
|
3
|
+
declare module '@walkeros/core' {
|
|
4
|
+
interface SourceMap {
|
|
5
|
+
demo: {
|
|
6
|
+
type: 'demo';
|
|
7
|
+
platform?: 'web';
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
}
|
|
3
11
|
interface Settings {
|
|
4
12
|
events: Array<WalkerOS.PartialEvent & {
|
|
5
13
|
delay?: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { Source, Elb, WalkerOS, Flow } from '@walkeros/core';
|
|
2
2
|
|
|
3
|
+
declare module '@walkeros/core' {
|
|
4
|
+
interface SourceMap {
|
|
5
|
+
demo: {
|
|
6
|
+
type: 'demo';
|
|
7
|
+
platform?: 'web';
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
}
|
|
3
11
|
interface Settings {
|
|
4
12
|
events: Array<WalkerOS.PartialEvent & {
|
|
5
13
|
delay?: number;
|
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 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;;;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mC;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\ndeclare module '@walkeros/core' {\n interface SourceMap {\n demo: { type: 'demo'; platform?: 'web' };\n }\n}\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,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,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.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 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":[]}
|
|
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\ndeclare module '@walkeros/core' {\n interface SourceMap {\n demo: { type: 'demo'; platform?: 'web' };\n }\n}\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
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": "
|
|
4
|
+
"version": "4.0.0-next-1777463920154",
|
|
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": "
|
|
41
|
+
"@walkeros/core": "4.0.0-next-1777463920154"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@walkeros/collector": "
|
|
44
|
+
"@walkeros/collector": "4.0.0-next-1777463920154"
|
|
45
45
|
},
|
|
46
46
|
"repository": {
|
|
47
47
|
"url": "git+https://github.com/elbwalker/walkerOS.git",
|