@walkeros/transformer-demo 2.0.2-next-1773136823705 → 3.0.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 +49 -0
- package/dist/dev.d.ts +49 -0
- package/dist/dev.js +1 -0
- package/dist/dev.js.map +1 -0
- package/dist/dev.mjs +1 -0
- package/dist/dev.mjs.map +1 -0
- package/dist/walkerOS.json +47 -0
- package/package.json +6 -3
package/dist/dev.d.mts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as _walkeros_core_dev from '@walkeros/core/dev';
|
|
2
|
+
import { z } from '@walkeros/core/dev';
|
|
3
|
+
import { Transformer } from '@walkeros/core';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Demo transformer settings schema.
|
|
7
|
+
*
|
|
8
|
+
* Mirrors: types.ts Settings
|
|
9
|
+
*/
|
|
10
|
+
declare const SettingsSchema: z.ZodObject<{
|
|
11
|
+
name: z.ZodOptional<z.ZodString>;
|
|
12
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
13
|
+
addProcessedFlag: z.ZodOptional<z.ZodBoolean>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
type Settings = z.infer<typeof SettingsSchema>;
|
|
16
|
+
|
|
17
|
+
declare const settings: _walkeros_core_dev.JSONSchema;
|
|
18
|
+
|
|
19
|
+
type index$1_Settings = Settings;
|
|
20
|
+
declare const index$1_SettingsSchema: typeof SettingsSchema;
|
|
21
|
+
declare const index$1_settings: typeof settings;
|
|
22
|
+
declare namespace index$1 {
|
|
23
|
+
export { type index$1_Settings as Settings, index$1_SettingsSchema as SettingsSchema, index$1_settings as settings };
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface Env extends Transformer.BaseEnv {
|
|
27
|
+
log?: (msg: string) => void;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
declare const init: Env | undefined;
|
|
31
|
+
declare const push: Env;
|
|
32
|
+
/**
|
|
33
|
+
* Simulation tracking paths
|
|
34
|
+
*/
|
|
35
|
+
declare const simulation: string[];
|
|
36
|
+
|
|
37
|
+
declare const env_init: typeof init;
|
|
38
|
+
declare const env_push: typeof push;
|
|
39
|
+
declare const env_simulation: typeof simulation;
|
|
40
|
+
declare namespace env {
|
|
41
|
+
export { env_init as init, env_push as push, env_simulation as simulation };
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
declare const index_env: typeof env;
|
|
45
|
+
declare namespace index {
|
|
46
|
+
export { index_env as env };
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { index as examples, index$1 as schemas };
|
package/dist/dev.d.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as _walkeros_core_dev from '@walkeros/core/dev';
|
|
2
|
+
import { z } from '@walkeros/core/dev';
|
|
3
|
+
import { Transformer } from '@walkeros/core';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Demo transformer settings schema.
|
|
7
|
+
*
|
|
8
|
+
* Mirrors: types.ts Settings
|
|
9
|
+
*/
|
|
10
|
+
declare const SettingsSchema: z.ZodObject<{
|
|
11
|
+
name: z.ZodOptional<z.ZodString>;
|
|
12
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
13
|
+
addProcessedFlag: z.ZodOptional<z.ZodBoolean>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
type Settings = z.infer<typeof SettingsSchema>;
|
|
16
|
+
|
|
17
|
+
declare const settings: _walkeros_core_dev.JSONSchema;
|
|
18
|
+
|
|
19
|
+
type index$1_Settings = Settings;
|
|
20
|
+
declare const index$1_SettingsSchema: typeof SettingsSchema;
|
|
21
|
+
declare const index$1_settings: typeof settings;
|
|
22
|
+
declare namespace index$1 {
|
|
23
|
+
export { type index$1_Settings as Settings, index$1_SettingsSchema as SettingsSchema, index$1_settings as settings };
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface Env extends Transformer.BaseEnv {
|
|
27
|
+
log?: (msg: string) => void;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
declare const init: Env | undefined;
|
|
31
|
+
declare const push: Env;
|
|
32
|
+
/**
|
|
33
|
+
* Simulation tracking paths
|
|
34
|
+
*/
|
|
35
|
+
declare const simulation: string[];
|
|
36
|
+
|
|
37
|
+
declare const env_init: typeof init;
|
|
38
|
+
declare const env_push: typeof push;
|
|
39
|
+
declare const env_simulation: typeof simulation;
|
|
40
|
+
declare namespace env {
|
|
41
|
+
export { env_init as init, env_push as push, env_simulation as simulation };
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
declare const index_env: typeof env;
|
|
45
|
+
declare namespace index {
|
|
46
|
+
export { index_env as env };
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { index as examples, index$1 as schemas };
|
package/dist/dev.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e,o=Object.defineProperty,t=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,s=(e,t)=>{for(var r in t)o(e,r,{get:t[r],enumerable:!0})},n={};s(n,{examples:()=>p,schemas:()=>l}),module.exports=(e=n,((e,s,n,l)=>{if(s&&"object"==typeof s||"function"==typeof s)for(let i of r(s))a.call(e,i)||i===n||o(e,i,{get:()=>s[i],enumerable:!(l=t(s,i))||l.enumerable});return e})(o({},"__esModule",{value:!0}),e));var l={};s(l,{SettingsSchema:()=>c,settings:()=>g});var i=require("@walkeros/core/dev"),d=require("@walkeros/core/dev"),c=d.z.object({name:d.z.string().optional().describe('Custom name for logging prefix. Default: "transformer-demo"'),fields:d.z.array(d.z.string()).optional().describe("Dot-notation paths to log from the event. If omitted, logs entire event."),addProcessedFlag:d.z.boolean().optional().describe("If true, adds _processed and _processedBy flags to event.data")}).describe("Demo transformer: logs events and optionally adds processed flag"),g=(0,i.zodToSchema)(c),p={};s(p,{env:()=>f});var f={};s(f,{init:()=>m,push:()=>u,simulation:()=>b});var m={log:void 0},u={log:Object.assign(()=>{},{})},b=["call:log"];//# sourceMappingURL=dev.js.map
|
package/dist/dev.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/dev.ts","../src/schemas/index.ts","../src/schemas/settings.ts","../src/examples/index.ts","../src/examples/env.ts"],"sourcesContent":["export * as schemas from './schemas';\nexport * as examples from './examples';\n","import { zodToSchema } from '@walkeros/core/dev';\nimport { SettingsSchema } from './settings';\n\nexport { SettingsSchema, type Settings } from './settings';\nexport const settings = zodToSchema(SettingsSchema);\n","import { z } from '@walkeros/core/dev';\n\n/**\n * Demo transformer settings schema.\n *\n * Mirrors: types.ts Settings\n */\nexport const SettingsSchema = z\n .object({\n name: z\n .string()\n .optional()\n .describe('Custom name for logging prefix. Default: \"transformer-demo\"'),\n fields: z\n .array(z.string())\n .optional()\n .describe(\n 'Dot-notation paths to log from the event. If omitted, logs entire event.',\n ),\n addProcessedFlag: z\n .boolean()\n .optional()\n .describe(\n 'If true, adds _processed and _processedBy flags to event.data',\n ),\n })\n .describe('Demo transformer: logs events and optionally adds processed flag');\n\nexport type Settings = z.infer<typeof SettingsSchema>;\n","export * as env from './env';\n","import type { Env } from '../types';\n\n/**\n * Example environment configurations for transformer demo\n */\n\nconst noop = () => {};\n\nexport const init: Env | undefined = {\n log: undefined,\n};\n\nexport const push: Env = {\n log: Object.assign(noop, {}) as Env['log'],\n};\n\n/**\n * Simulation tracking paths\n */\nexport const simulation = ['call:log'];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,cAA4B;;;ACA5B,iBAAkB;AAOX,IAAM,iBAAiB,aAC3B,OAAO;AAAA,EACN,MAAM,aACH,OAAO,EACP,SAAS,EACT,SAAS,6DAA6D;AAAA,EACzE,QAAQ,aACL,MAAM,aAAE,OAAO,CAAC,EAChB,SAAS,EACT;AAAA,IACC;AAAA,EACF;AAAA,EACF,kBAAkB,aACf,QAAQ,EACR,SAAS,EACT;AAAA,IACC;AAAA,EACF;AACJ,CAAC,EACA,SAAS,kEAAkE;;;ADtBvE,IAAM,eAAW,yBAAY,cAAc;;;AEJlD;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,IAAM,OAAO,MAAM;AAAC;AAEb,IAAM,OAAwB;AAAA,EACnC,KAAK;AACP;AAEO,IAAM,OAAY;AAAA,EACvB,KAAK,OAAO,OAAO,MAAM,CAAC,CAAC;AAC7B;AAKO,IAAM,aAAa,CAAC,UAAU;","names":["import_dev"]}
|
package/dist/dev.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.defineProperty,o=(o,r)=>{for(var a in r)e(o,a,{get:r[a],enumerable:!0})},r={};o(r,{SettingsSchema:()=>s,settings:()=>n});import{zodToSchema as a}from"@walkeros/core/dev";import{z as t}from"@walkeros/core/dev";var s=t.object({name:t.string().optional().describe('Custom name for logging prefix. Default: "transformer-demo"'),fields:t.array(t.string()).optional().describe("Dot-notation paths to log from the event. If omitted, logs entire event."),addProcessedFlag:t.boolean().optional().describe("If true, adds _processed and _processedBy flags to event.data")}).describe("Demo transformer: logs events and optionally adds processed flag"),n=a(s),i={};o(i,{env:()=>l});var l={};o(l,{init:()=>d,push:()=>g,simulation:()=>m});var d={log:void 0},g={log:Object.assign(()=>{},{})},m=["call:log"];export{i as examples,r as schemas};//# sourceMappingURL=dev.mjs.map
|
package/dist/dev.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/index.ts","../src/schemas/settings.ts","../src/examples/index.ts","../src/examples/env.ts"],"sourcesContent":["import { zodToSchema } from '@walkeros/core/dev';\nimport { SettingsSchema } from './settings';\n\nexport { SettingsSchema, type Settings } from './settings';\nexport const settings = zodToSchema(SettingsSchema);\n","import { z } from '@walkeros/core/dev';\n\n/**\n * Demo transformer settings schema.\n *\n * Mirrors: types.ts Settings\n */\nexport const SettingsSchema = z\n .object({\n name: z\n .string()\n .optional()\n .describe('Custom name for logging prefix. Default: \"transformer-demo\"'),\n fields: z\n .array(z.string())\n .optional()\n .describe(\n 'Dot-notation paths to log from the event. If omitted, logs entire event.',\n ),\n addProcessedFlag: z\n .boolean()\n .optional()\n .describe(\n 'If true, adds _processed and _processedBy flags to event.data',\n ),\n })\n .describe('Demo transformer: logs events and optionally adds processed flag');\n\nexport type Settings = z.infer<typeof SettingsSchema>;\n","export * as env from './env';\n","import type { Env } from '../types';\n\n/**\n * Example environment configurations for transformer demo\n */\n\nconst noop = () => {};\n\nexport const init: Env | undefined = {\n log: undefined,\n};\n\nexport const push: Env = {\n log: Object.assign(noop, {}) as Env['log'],\n};\n\n/**\n * Simulation tracking paths\n */\nexport const simulation = ['call:log'];\n"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAS,mBAAmB;;;ACA5B,SAAS,SAAS;AAOX,IAAM,iBAAiB,EAC3B,OAAO;AAAA,EACN,MAAM,EACH,OAAO,EACP,SAAS,EACT,SAAS,6DAA6D;AAAA,EACzE,QAAQ,EACL,MAAM,EAAE,OAAO,CAAC,EAChB,SAAS,EACT;AAAA,IACC;AAAA,EACF;AAAA,EACF,kBAAkB,EACf,QAAQ,EACR,SAAS,EACT;AAAA,IACC;AAAA,EACF;AACJ,CAAC,EACA,SAAS,kEAAkE;;;ADtBvE,IAAM,WAAW,YAAY,cAAc;;;AEJlD;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,IAAM,OAAO,MAAM;AAAC;AAEb,IAAM,OAAwB;AAAA,EACnC,KAAK;AACP;AAEO,IAAM,OAAY;AAAA,EACvB,KAAK,OAAO,OAAO,MAAM,CAAC,CAAC;AAC7B;AAKO,IAAM,aAAa,CAAC,UAAU;","names":[]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$meta": {
|
|
3
|
+
"package": "@walkeros/transformer-demo",
|
|
4
|
+
"version": "2.0.1",
|
|
5
|
+
"type": "transformer",
|
|
6
|
+
"docs": "https://www.walkeros.io/docs/transformers/demo",
|
|
7
|
+
"source": "https://github.com/elbwalker/walkerOS/tree/main/packages/transformers/demo/src"
|
|
8
|
+
},
|
|
9
|
+
"schemas": {
|
|
10
|
+
"settings": {
|
|
11
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"name": {
|
|
15
|
+
"description": "Custom name for logging prefix. Default: \"transformer-demo\"",
|
|
16
|
+
"type": "string"
|
|
17
|
+
},
|
|
18
|
+
"fields": {
|
|
19
|
+
"description": "Dot-notation paths to log from the event. If omitted, logs entire event.",
|
|
20
|
+
"type": "array",
|
|
21
|
+
"items": {
|
|
22
|
+
"type": "string"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"addProcessedFlag": {
|
|
26
|
+
"description": "If true, adds _processed and _processedBy flags to event.data",
|
|
27
|
+
"type": "boolean"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"additionalProperties": false,
|
|
31
|
+
"description": "Demo transformer: logs events and optionally adds processed flag"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"examples": {
|
|
35
|
+
"env": {
|
|
36
|
+
"init": {},
|
|
37
|
+
"push": {
|
|
38
|
+
"log": {
|
|
39
|
+
"$code": "()=>{}"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"simulation": [
|
|
43
|
+
"call:log"
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@walkeros/transformer-demo",
|
|
3
3
|
"description": "Demo transformer for walkerOS - logs and passes through events",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.0",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"sideEffects": false,
|
|
7
6
|
"main": "./dist/index.js",
|
|
8
7
|
"module": "./dist/index.mjs",
|
|
9
8
|
"types": "./dist/index.d.ts",
|
|
@@ -26,7 +25,7 @@
|
|
|
26
25
|
"test": "jest"
|
|
27
26
|
},
|
|
28
27
|
"dependencies": {
|
|
29
|
-
"@walkeros/core": "
|
|
28
|
+
"@walkeros/core": "^3.0.0"
|
|
30
29
|
},
|
|
31
30
|
"repository": {
|
|
32
31
|
"url": "git+https://github.com/elbwalker/walkerOS.git",
|
|
@@ -37,6 +36,10 @@
|
|
|
37
36
|
"bugs": {
|
|
38
37
|
"url": "https://github.com/elbwalker/walkerOS/issues"
|
|
39
38
|
},
|
|
39
|
+
"walkerOS": {
|
|
40
|
+
"type": "transformer",
|
|
41
|
+
"docs": "https://www.walkeros.io/docs/transformers/demo"
|
|
42
|
+
},
|
|
40
43
|
"keywords": [
|
|
41
44
|
"walkerOS",
|
|
42
45
|
"transformer",
|