@walkeros/server-store-fs 3.3.1 → 3.4.0-next-1776749829492

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 CHANGED
@@ -1 +1 @@
1
- "use strict";var e,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,s=(e,r)=>{for(var a in r)t(e,a,{get:r[a],enumerable:!0})},o={};s(o,{examples:()=>d,schemas:()=>n}),module.exports=(e=o,((e,s,o,n)=>{if(s&&"object"==typeof s||"function"==typeof s)for(let c of a(s))i.call(e,c)||c===o||t(e,c,{get:()=>s[c],enumerable:!(n=r(s,c))||n.enumerable});return e})(t({},"__esModule",{value:!0}),e));var n={};s(n,{SettingsSchema:()=>u,settings:()=>p});var c=require("@walkeros/core/dev"),l=require("@walkeros/core/dev"),u=l.z.object({basePath:l.z.string().min(1).describe("Root directory for file operations. All keys are resolved relative to this path.")}),p=(0,c.zodToSchema)(u),d={};s(d,{staticAssets:()=>b,step:()=>v});var v={};s(v,{pathTraversalRejection:()=>m,readExistingFile:()=>f,writeNewFile:()=>g});var f={description:"Read an existing file and receive its contents as a Buffer",in:{operation:"get",key:"walker.js"},out:{value:'Buffer<console.log("walkerOS")>'}},g={description:"Write creates intermediate directories automatically",in:{operation:"set",key:"js/custom/tracker.js",value:"Buffer<(function(){...})()>"},out:{written:!0,path:"{basePath}/js/custom/tracker.js"}},m={description:"Path traversal via .. segments is rejected with a warning",in:{operation:"get",key:"../../etc/passwd"},out:{value:void 0,rejected:!0}},b={settings:{basePath:"./public"}};//# sourceMappingURL=dev.js.map
1
+ "use strict";var e,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,i=(e,r)=>{for(var s in r)t(e,s,{get:r[s],enumerable:!0})},o={};i(o,{examples:()=>d,schemas:()=>n}),module.exports=(e=o,((e,i,o,n)=>{if(i&&"object"==typeof i||"function"==typeof i)for(let c of s(i))a.call(e,c)||c===o||t(e,c,{get:()=>i[c],enumerable:!(n=r(i,c))||n.enumerable});return e})(t({},"__esModule",{value:!0}),e));var n={};i(n,{SettingsSchema:()=>u,settings:()=>p});var c=require("@walkeros/core/dev"),l=require("@walkeros/core/dev"),u=l.z.object({basePath:l.z.string().min(1).describe("Root directory for file operations. All keys are resolved relative to this path.")}),p=(0,c.zodToSchema)(u),d={};i(d,{staticAssets:()=>j,step:()=>f});var f={};i(f,{pathTraversalRejection:()=>m,readExistingFile:()=>g,writeNewFile:()=>v});var g={description:"Read an existing file and receive its contents as a Buffer",in:{operation:"get",key:"walker.js"},out:[["get","walker.js",'Buffer<console.log("walkerOS")>']]},v={description:"Write creates intermediate directories automatically",in:{operation:"set",key:"js/custom/tracker.js",value:"Buffer<(function(){...})()>"},out:[["set","js/custom/tracker.js","Buffer<(function(){...})()>"]]},m={description:"Path traversal via .. segments is rejected with a warning",in:{operation:"get",key:"../../etc/passwd"},out:[["get","../../etc/passwd",void 0]]},j={settings:{basePath:"./public"}};//# 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/examples/index.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';\n\nexport { SettingsSchema, type Settings } from './settings';\n\nexport const settings = zodToSchema(SettingsSchema);\n","import { z } from '@walkeros/core/dev';\n\nexport const SettingsSchema = z.object({\n basePath: z\n .string()\n .min(1)\n .describe(\n 'Root directory for file operations. All keys are resolved relative to this path.',\n ),\n});\n\nexport type Settings = z.infer<typeof SettingsSchema>;\n","import type { Store } from '@walkeros/core';\n\n/** Serve static files from a local directory */\nexport const staticAssets: Store.Config = {\n settings: {\n basePath: './public',\n },\n};\n\nexport * as step from './step';\n","import type { Flow } from '@walkeros/core';\n\n/** Read a file that exists in the store directory. */\nexport const readExistingFile: Flow.StepExample = {\n description: 'Read an existing file and receive its contents as a Buffer',\n in: { operation: 'get', key: 'walker.js' },\n out: { value: 'Buffer<console.log(\"walkerOS\")>' },\n};\n\n/** Write a file with auto-created parent directories. */\nexport const writeNewFile: Flow.StepExample = {\n description: 'Write creates intermediate directories automatically',\n in: {\n operation: 'set',\n key: 'js/custom/tracker.js',\n value: 'Buffer<(function(){...})()>',\n },\n out: { written: true, path: '{basePath}/js/custom/tracker.js' },\n};\n\n/** Path traversal attempt is rejected for security. */\nexport const pathTraversalRejection: Flow.StepExample = {\n description: 'Path traversal via .. segments is rejected with a warning',\n in: { operation: 'get', key: '../../etc/passwd' },\n out: { value: undefined, rejected: true },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,cAA4B;;;ACA5B,iBAAkB;AAEX,IAAM,iBAAiB,aAAE,OAAO;AAAA,EACrC,UAAU,aACP,OAAO,EACP,IAAI,CAAC,EACL;AAAA,IACC;AAAA,EACF;AACJ,CAAC;;;ADJM,IAAM,eAAW,yBAAY,cAAc;;;AELlD;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,IAAM,mBAAqC;AAAA,EAChD,aAAa;AAAA,EACb,IAAI,EAAE,WAAW,OAAO,KAAK,YAAY;AAAA,EACzC,KAAK,EAAE,OAAO,kCAAkC;AAClD;AAGO,IAAM,eAAiC;AAAA,EAC5C,aAAa;AAAA,EACb,IAAI;AAAA,IACF,WAAW;AAAA,IACX,KAAK;AAAA,IACL,OAAO;AAAA,EACT;AAAA,EACA,KAAK,EAAE,SAAS,MAAM,MAAM,kCAAkC;AAChE;AAGO,IAAM,yBAA2C;AAAA,EACtD,aAAa;AAAA,EACb,IAAI,EAAE,WAAW,OAAO,KAAK,mBAAmB;AAAA,EAChD,KAAK,EAAE,OAAO,QAAW,UAAU,KAAK;AAC1C;;;ADtBO,IAAM,eAA6B;AAAA,EACxC,UAAU;AAAA,IACR,UAAU;AAAA,EACZ;AACF;","names":["import_dev"]}
1
+ {"version":3,"sources":["../src/dev.ts","../src/schemas/index.ts","../src/schemas/settings.ts","../src/examples/index.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';\n\nexport { SettingsSchema, type Settings } from './settings';\n\nexport const settings = zodToSchema(SettingsSchema);\n","import { z } from '@walkeros/core/dev';\n\nexport const SettingsSchema = z.object({\n basePath: z\n .string()\n .min(1)\n .describe(\n 'Root directory for file operations. All keys are resolved relative to this path.',\n ),\n});\n\nexport type Settings = z.infer<typeof SettingsSchema>;\n","import type { Store } from '@walkeros/core';\n\n/** Serve static files from a local directory */\nexport const staticAssets: Store.Config = {\n settings: {\n basePath: './public',\n },\n};\n\nexport * as step from './step';\n","import type { Flow } from '@walkeros/core';\n\n/** Read a file that exists in the store directory. */\nexport const readExistingFile: Flow.StepExample = {\n description: 'Read an existing file and receive its contents as a Buffer',\n in: { operation: 'get', key: 'walker.js' },\n out: [['get', 'walker.js', 'Buffer<console.log(\"walkerOS\")>']],\n};\n\n/** Write a file with auto-created parent directories. */\nexport const writeNewFile: Flow.StepExample = {\n description: 'Write creates intermediate directories automatically',\n in: {\n operation: 'set',\n key: 'js/custom/tracker.js',\n value: 'Buffer<(function(){...})()>',\n },\n out: [['set', 'js/custom/tracker.js', 'Buffer<(function(){...})()>']],\n};\n\n/** Path traversal attempt is rejected for security. */\nexport const pathTraversalRejection: Flow.StepExample = {\n description: 'Path traversal via .. segments is rejected with a warning',\n in: { operation: 'get', key: '../../etc/passwd' },\n out: [['get', '../../etc/passwd', undefined]],\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,cAA4B;;;ACA5B,iBAAkB;AAEX,IAAM,iBAAiB,aAAE,OAAO;AAAA,EACrC,UAAU,aACP,OAAO,EACP,IAAI,CAAC,EACL;AAAA,IACC;AAAA,EACF;AACJ,CAAC;;;ADJM,IAAM,eAAW,yBAAY,cAAc;;;AELlD;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,IAAM,mBAAqC;AAAA,EAChD,aAAa;AAAA,EACb,IAAI,EAAE,WAAW,OAAO,KAAK,YAAY;AAAA,EACzC,KAAK,CAAC,CAAC,OAAO,aAAa,iCAAiC,CAAC;AAC/D;AAGO,IAAM,eAAiC;AAAA,EAC5C,aAAa;AAAA,EACb,IAAI;AAAA,IACF,WAAW;AAAA,IACX,KAAK;AAAA,IACL,OAAO;AAAA,EACT;AAAA,EACA,KAAK,CAAC,CAAC,OAAO,wBAAwB,6BAA6B,CAAC;AACtE;AAGO,IAAM,yBAA2C;AAAA,EACtD,aAAa;AAAA,EACb,IAAI,EAAE,WAAW,OAAO,KAAK,mBAAmB;AAAA,EAChD,KAAK,CAAC,CAAC,OAAO,oBAAoB,MAAS,CAAC;AAC9C;;;ADtBO,IAAM,eAA6B;AAAA,EACxC,UAAU;AAAA,IACR,UAAU;AAAA,EACZ;AACF;","names":["import_dev"]}
package/dist/dev.mjs CHANGED
@@ -1 +1 @@
1
- var e=Object.defineProperty,t=(t,r)=>{for(var a in r)e(t,a,{get:r[a],enumerable:!0})},r={};t(r,{SettingsSchema:()=>s,settings:()=>o});import{zodToSchema as a}from"@walkeros/core/dev";import{z as i}from"@walkeros/core/dev";var s=i.object({basePath:i.string().min(1).describe("Root directory for file operations. All keys are resolved relative to this path.")}),o=a(s),n={};t(n,{staticAssets:()=>v,step:()=>c});var c={};t(c,{pathTraversalRejection:()=>p,readExistingFile:()=>l,writeNewFile:()=>d});var l={description:"Read an existing file and receive its contents as a Buffer",in:{operation:"get",key:"walker.js"},out:{value:'Buffer<console.log("walkerOS")>'}},d={description:"Write creates intermediate directories automatically",in:{operation:"set",key:"js/custom/tracker.js",value:"Buffer<(function(){...})()>"},out:{written:!0,path:"{basePath}/js/custom/tracker.js"}},p={description:"Path traversal via .. segments is rejected with a warning",in:{operation:"get",key:"../../etc/passwd"},out:{value:void 0,rejected:!0}},v={settings:{basePath:"./public"}};export{n as examples,r as schemas};//# sourceMappingURL=dev.mjs.map
1
+ var e=Object.defineProperty,t=(t,r)=>{for(var s in r)e(t,s,{get:r[s],enumerable:!0})},r={};t(r,{SettingsSchema:()=>i,settings:()=>o});import{zodToSchema as s}from"@walkeros/core/dev";import{z as a}from"@walkeros/core/dev";var i=a.object({basePath:a.string().min(1).describe("Root directory for file operations. All keys are resolved relative to this path.")}),o=s(i),n={};t(n,{staticAssets:()=>f,step:()=>c});var c={};t(c,{pathTraversalRejection:()=>p,readExistingFile:()=>l,writeNewFile:()=>d});var l={description:"Read an existing file and receive its contents as a Buffer",in:{operation:"get",key:"walker.js"},out:[["get","walker.js",'Buffer<console.log("walkerOS")>']]},d={description:"Write creates intermediate directories automatically",in:{operation:"set",key:"js/custom/tracker.js",value:"Buffer<(function(){...})()>"},out:[["set","js/custom/tracker.js","Buffer<(function(){...})()>"]]},p={description:"Path traversal via .. segments is rejected with a warning",in:{operation:"get",key:"../../etc/passwd"},out:[["get","../../etc/passwd",void 0]]},f={settings:{basePath:"./public"}};export{n as examples,r 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/examples/index.ts","../src/examples/step.ts"],"sourcesContent":["import { zodToSchema } from '@walkeros/core/dev';\nimport { SettingsSchema } from './settings';\n\nexport { SettingsSchema, type Settings } from './settings';\n\nexport const settings = zodToSchema(SettingsSchema);\n","import { z } from '@walkeros/core/dev';\n\nexport const SettingsSchema = z.object({\n basePath: z\n .string()\n .min(1)\n .describe(\n 'Root directory for file operations. All keys are resolved relative to this path.',\n ),\n});\n\nexport type Settings = z.infer<typeof SettingsSchema>;\n","import type { Store } from '@walkeros/core';\n\n/** Serve static files from a local directory */\nexport const staticAssets: Store.Config = {\n settings: {\n basePath: './public',\n },\n};\n\nexport * as step from './step';\n","import type { Flow } from '@walkeros/core';\n\n/** Read a file that exists in the store directory. */\nexport const readExistingFile: Flow.StepExample = {\n description: 'Read an existing file and receive its contents as a Buffer',\n in: { operation: 'get', key: 'walker.js' },\n out: { value: 'Buffer<console.log(\"walkerOS\")>' },\n};\n\n/** Write a file with auto-created parent directories. */\nexport const writeNewFile: Flow.StepExample = {\n description: 'Write creates intermediate directories automatically',\n in: {\n operation: 'set',\n key: 'js/custom/tracker.js',\n value: 'Buffer<(function(){...})()>',\n },\n out: { written: true, path: '{basePath}/js/custom/tracker.js' },\n};\n\n/** Path traversal attempt is rejected for security. */\nexport const pathTraversalRejection: Flow.StepExample = {\n description: 'Path traversal via .. segments is rejected with a warning',\n in: { operation: 'get', key: '../../etc/passwd' },\n out: { value: undefined, rejected: true },\n};\n"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAS,mBAAmB;;;ACA5B,SAAS,SAAS;AAEX,IAAM,iBAAiB,EAAE,OAAO;AAAA,EACrC,UAAU,EACP,OAAO,EACP,IAAI,CAAC,EACL;AAAA,IACC;AAAA,EACF;AACJ,CAAC;;;ADJM,IAAM,WAAW,YAAY,cAAc;;;AELlD;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,IAAM,mBAAqC;AAAA,EAChD,aAAa;AAAA,EACb,IAAI,EAAE,WAAW,OAAO,KAAK,YAAY;AAAA,EACzC,KAAK,EAAE,OAAO,kCAAkC;AAClD;AAGO,IAAM,eAAiC;AAAA,EAC5C,aAAa;AAAA,EACb,IAAI;AAAA,IACF,WAAW;AAAA,IACX,KAAK;AAAA,IACL,OAAO;AAAA,EACT;AAAA,EACA,KAAK,EAAE,SAAS,MAAM,MAAM,kCAAkC;AAChE;AAGO,IAAM,yBAA2C;AAAA,EACtD,aAAa;AAAA,EACb,IAAI,EAAE,WAAW,OAAO,KAAK,mBAAmB;AAAA,EAChD,KAAK,EAAE,OAAO,QAAW,UAAU,KAAK;AAC1C;;;ADtBO,IAAM,eAA6B;AAAA,EACxC,UAAU;AAAA,IACR,UAAU;AAAA,EACZ;AACF;","names":[]}
1
+ {"version":3,"sources":["../src/schemas/index.ts","../src/schemas/settings.ts","../src/examples/index.ts","../src/examples/step.ts"],"sourcesContent":["import { zodToSchema } from '@walkeros/core/dev';\nimport { SettingsSchema } from './settings';\n\nexport { SettingsSchema, type Settings } from './settings';\n\nexport const settings = zodToSchema(SettingsSchema);\n","import { z } from '@walkeros/core/dev';\n\nexport const SettingsSchema = z.object({\n basePath: z\n .string()\n .min(1)\n .describe(\n 'Root directory for file operations. All keys are resolved relative to this path.',\n ),\n});\n\nexport type Settings = z.infer<typeof SettingsSchema>;\n","import type { Store } from '@walkeros/core';\n\n/** Serve static files from a local directory */\nexport const staticAssets: Store.Config = {\n settings: {\n basePath: './public',\n },\n};\n\nexport * as step from './step';\n","import type { Flow } from '@walkeros/core';\n\n/** Read a file that exists in the store directory. */\nexport const readExistingFile: Flow.StepExample = {\n description: 'Read an existing file and receive its contents as a Buffer',\n in: { operation: 'get', key: 'walker.js' },\n out: [['get', 'walker.js', 'Buffer<console.log(\"walkerOS\")>']],\n};\n\n/** Write a file with auto-created parent directories. */\nexport const writeNewFile: Flow.StepExample = {\n description: 'Write creates intermediate directories automatically',\n in: {\n operation: 'set',\n key: 'js/custom/tracker.js',\n value: 'Buffer<(function(){...})()>',\n },\n out: [['set', 'js/custom/tracker.js', 'Buffer<(function(){...})()>']],\n};\n\n/** Path traversal attempt is rejected for security. */\nexport const pathTraversalRejection: Flow.StepExample = {\n description: 'Path traversal via .. segments is rejected with a warning',\n in: { operation: 'get', key: '../../etc/passwd' },\n out: [['get', '../../etc/passwd', undefined]],\n};\n"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAS,mBAAmB;;;ACA5B,SAAS,SAAS;AAEX,IAAM,iBAAiB,EAAE,OAAO;AAAA,EACrC,UAAU,EACP,OAAO,EACP,IAAI,CAAC,EACL;AAAA,IACC;AAAA,EACF;AACJ,CAAC;;;ADJM,IAAM,WAAW,YAAY,cAAc;;;AELlD;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,IAAM,mBAAqC;AAAA,EAChD,aAAa;AAAA,EACb,IAAI,EAAE,WAAW,OAAO,KAAK,YAAY;AAAA,EACzC,KAAK,CAAC,CAAC,OAAO,aAAa,iCAAiC,CAAC;AAC/D;AAGO,IAAM,eAAiC;AAAA,EAC5C,aAAa;AAAA,EACb,IAAI;AAAA,IACF,WAAW;AAAA,IACX,KAAK;AAAA,IACL,OAAO;AAAA,EACT;AAAA,EACA,KAAK,CAAC,CAAC,OAAO,wBAAwB,6BAA6B,CAAC;AACtE;AAGO,IAAM,yBAA2C;AAAA,EACtD,aAAa;AAAA,EACb,IAAI,EAAE,WAAW,OAAO,KAAK,mBAAmB;AAAA,EAChD,KAAK,CAAC,CAAC,OAAO,oBAAoB,MAAS,CAAC;AAC9C;;;ADtBO,IAAM,eAA6B;AAAA,EACxC,UAAU;AAAA,IACR,UAAU;AAAA,EACZ;AACF;","names":[]}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$meta": {
3
3
  "package": "@walkeros/server-store-fs",
4
- "version": "3.3.1",
4
+ "version": "3.4.0-next-1776749829492",
5
5
  "type": "store",
6
6
  "platform": [
7
7
  "server"
@@ -39,9 +39,13 @@
39
39
  "operation": "get",
40
40
  "key": "../../etc/passwd"
41
41
  },
42
- "out": {
43
- "rejected": true
44
- }
42
+ "out": [
43
+ [
44
+ "get",
45
+ "../../etc/passwd",
46
+ null
47
+ ]
48
+ ]
45
49
  },
46
50
  "readExistingFile": {
47
51
  "description": "Read an existing file and receive its contents as a Buffer",
@@ -49,9 +53,13 @@
49
53
  "operation": "get",
50
54
  "key": "walker.js"
51
55
  },
52
- "out": {
53
- "value": "Buffer<console.log(\"walkerOS\")>"
54
- }
56
+ "out": [
57
+ [
58
+ "get",
59
+ "walker.js",
60
+ "Buffer<console.log(\"walkerOS\")>"
61
+ ]
62
+ ]
55
63
  },
56
64
  "writeNewFile": {
57
65
  "description": "Write creates intermediate directories automatically",
@@ -60,10 +68,13 @@
60
68
  "key": "js/custom/tracker.js",
61
69
  "value": "Buffer<(function(){...})()>"
62
70
  },
63
- "out": {
64
- "written": true,
65
- "path": "{basePath}/js/custom/tracker.js"
66
- }
71
+ "out": [
72
+ [
73
+ "set",
74
+ "js/custom/tracker.js",
75
+ "Buffer<(function(){...})()>"
76
+ ]
77
+ ]
67
78
  }
68
79
  }
69
80
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@walkeros/server-store-fs",
3
3
  "description": "Filesystem store for walkerOS server - reads and writes files via the Store interface",
4
- "version": "3.3.1",
4
+ "version": "3.4.0-next-1776749829492",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.mjs",
@@ -32,10 +32,10 @@
32
32
  "update": "npx npm-check-updates -u && npm update"
33
33
  },
34
34
  "dependencies": {
35
- "@walkeros/core": "3.3.1"
35
+ "@walkeros/core": "3.4.0-next-1776749829492"
36
36
  },
37
37
  "devDependencies": {
38
- "@walkeros/core": "3.3.1"
38
+ "@walkeros/core": "3.4.0-next-1776749829492"
39
39
  },
40
40
  "repository": {
41
41
  "url": "git+https://github.com/elbwalker/walkerOS.git",