@walkeros/server-store-fs 0.2.0-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/README.md +1 -1
- package/dist/dev.d.mts +17 -2
- package/dist/dev.d.ts +17 -2
- 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/walkerOS.json +37 -1
- package/package.json +5 -5
package/README.md
CHANGED
package/dist/dev.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _walkeros_core_dev from '@walkeros/core/dev';
|
|
2
2
|
import { z } from '@walkeros/core/dev';
|
|
3
|
-
import { Store } from '@walkeros/core';
|
|
3
|
+
import { Flow, Store } from '@walkeros/core';
|
|
4
4
|
|
|
5
5
|
declare const SettingsSchema: z.ZodObject<{
|
|
6
6
|
basePath: z.ZodString;
|
|
@@ -16,12 +16,27 @@ declare namespace index$1 {
|
|
|
16
16
|
export { type index$1_Settings as Settings, index$1_SettingsSchema as SettingsSchema, index$1_settings as settings };
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
/** Read a file that exists in the store directory. */
|
|
20
|
+
declare const readExistingFile: Flow.StepExample;
|
|
21
|
+
/** Write a file with auto-created parent directories. */
|
|
22
|
+
declare const writeNewFile: Flow.StepExample;
|
|
23
|
+
/** Path traversal attempt is rejected for security. */
|
|
24
|
+
declare const pathTraversalRejection: Flow.StepExample;
|
|
25
|
+
|
|
26
|
+
declare const step_pathTraversalRejection: typeof pathTraversalRejection;
|
|
27
|
+
declare const step_readExistingFile: typeof readExistingFile;
|
|
28
|
+
declare const step_writeNewFile: typeof writeNewFile;
|
|
29
|
+
declare namespace step {
|
|
30
|
+
export { step_pathTraversalRejection as pathTraversalRejection, step_readExistingFile as readExistingFile, step_writeNewFile as writeNewFile };
|
|
31
|
+
}
|
|
32
|
+
|
|
19
33
|
/** Serve static files from a local directory */
|
|
20
34
|
declare const staticAssets: Store.Config;
|
|
21
35
|
|
|
22
36
|
declare const index_staticAssets: typeof staticAssets;
|
|
37
|
+
declare const index_step: typeof step;
|
|
23
38
|
declare namespace index {
|
|
24
|
-
export { index_staticAssets as staticAssets };
|
|
39
|
+
export { index_staticAssets as staticAssets, index_step as step };
|
|
25
40
|
}
|
|
26
41
|
|
|
27
42
|
export { index as examples, index$1 as schemas };
|
package/dist/dev.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _walkeros_core_dev from '@walkeros/core/dev';
|
|
2
2
|
import { z } from '@walkeros/core/dev';
|
|
3
|
-
import { Store } from '@walkeros/core';
|
|
3
|
+
import { Flow, Store } from '@walkeros/core';
|
|
4
4
|
|
|
5
5
|
declare const SettingsSchema: z.ZodObject<{
|
|
6
6
|
basePath: z.ZodString;
|
|
@@ -16,12 +16,27 @@ declare namespace index$1 {
|
|
|
16
16
|
export { type index$1_Settings as Settings, index$1_SettingsSchema as SettingsSchema, index$1_settings as settings };
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
/** Read a file that exists in the store directory. */
|
|
20
|
+
declare const readExistingFile: Flow.StepExample;
|
|
21
|
+
/** Write a file with auto-created parent directories. */
|
|
22
|
+
declare const writeNewFile: Flow.StepExample;
|
|
23
|
+
/** Path traversal attempt is rejected for security. */
|
|
24
|
+
declare const pathTraversalRejection: Flow.StepExample;
|
|
25
|
+
|
|
26
|
+
declare const step_pathTraversalRejection: typeof pathTraversalRejection;
|
|
27
|
+
declare const step_readExistingFile: typeof readExistingFile;
|
|
28
|
+
declare const step_writeNewFile: typeof writeNewFile;
|
|
29
|
+
declare namespace step {
|
|
30
|
+
export { step_pathTraversalRejection as pathTraversalRejection, step_readExistingFile as readExistingFile, step_writeNewFile as writeNewFile };
|
|
31
|
+
}
|
|
32
|
+
|
|
19
33
|
/** Serve static files from a local directory */
|
|
20
34
|
declare const staticAssets: Store.Config;
|
|
21
35
|
|
|
22
36
|
declare const index_staticAssets: typeof staticAssets;
|
|
37
|
+
declare const index_step: typeof step;
|
|
23
38
|
declare namespace index {
|
|
24
|
-
export { index_staticAssets as staticAssets };
|
|
39
|
+
export { index_staticAssets as staticAssets, index_step as step };
|
|
25
40
|
}
|
|
26
41
|
|
|
27
42
|
export { index as examples, index$1 as schemas };
|
package/dist/dev.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,
|
|
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
|
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"],"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"],"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;AAGO,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: { 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"]}
|
package/dist/dev.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=Object.defineProperty,
|
|
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
|
package/dist/dev.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/schemas/index.ts","../src/schemas/settings.ts","../src/examples/index.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"],"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;AAGO,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: { 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":[]}
|
package/dist/walkerOS.json
CHANGED
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
"package": "@walkeros/server-store-fs",
|
|
4
4
|
"version": "0.1.0",
|
|
5
5
|
"type": "store",
|
|
6
|
-
"platform": "server"
|
|
6
|
+
"platform": "server",
|
|
7
|
+
"docs": "https://www.walkeros.io/docs/stores/server/fs",
|
|
8
|
+
"source": "https://github.com/elbwalker/walkerOS/tree/main/packages/server/stores/fs/src"
|
|
7
9
|
},
|
|
8
10
|
"schemas": {
|
|
9
11
|
"settings": {
|
|
@@ -27,6 +29,40 @@
|
|
|
27
29
|
"settings": {
|
|
28
30
|
"basePath": "./public"
|
|
29
31
|
}
|
|
32
|
+
},
|
|
33
|
+
"step": {
|
|
34
|
+
"pathTraversalRejection": {
|
|
35
|
+
"description": "Path traversal via .. segments is rejected with a warning",
|
|
36
|
+
"in": {
|
|
37
|
+
"operation": "get",
|
|
38
|
+
"key": "../../etc/passwd"
|
|
39
|
+
},
|
|
40
|
+
"out": {
|
|
41
|
+
"rejected": true
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"readExistingFile": {
|
|
45
|
+
"description": "Read an existing file and receive its contents as a Buffer",
|
|
46
|
+
"in": {
|
|
47
|
+
"operation": "get",
|
|
48
|
+
"key": "walker.js"
|
|
49
|
+
},
|
|
50
|
+
"out": {
|
|
51
|
+
"value": "Buffer<console.log(\"walkerOS\")>"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"writeNewFile": {
|
|
55
|
+
"description": "Write creates intermediate directories automatically",
|
|
56
|
+
"in": {
|
|
57
|
+
"operation": "set",
|
|
58
|
+
"key": "js/custom/tracker.js",
|
|
59
|
+
"value": "Buffer<(function(){...})()>"
|
|
60
|
+
},
|
|
61
|
+
"out": {
|
|
62
|
+
"written": true,
|
|
63
|
+
"path": "{basePath}/js/custom/tracker.js"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
30
66
|
}
|
|
31
67
|
}
|
|
32
68
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
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": "0.
|
|
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",
|
|
@@ -32,10 +31,10 @@
|
|
|
32
31
|
"update": "npx npm-check-updates -u && npm update"
|
|
33
32
|
},
|
|
34
33
|
"dependencies": {
|
|
35
|
-
"@walkeros/core": "
|
|
34
|
+
"@walkeros/core": "^3.0.0"
|
|
36
35
|
},
|
|
37
36
|
"devDependencies": {
|
|
38
|
-
"@walkeros/core": "
|
|
37
|
+
"@walkeros/core": "^3.0.0"
|
|
39
38
|
},
|
|
40
39
|
"repository": {
|
|
41
40
|
"url": "git+https://github.com/elbwalker/walkerOS.git",
|
|
@@ -48,7 +47,8 @@
|
|
|
48
47
|
},
|
|
49
48
|
"walkerOS": {
|
|
50
49
|
"type": "store",
|
|
51
|
-
"platform": "server"
|
|
50
|
+
"platform": "server",
|
|
51
|
+
"docs": "https://www.walkeros.io/docs/stores/server/fs"
|
|
52
52
|
},
|
|
53
53
|
"keywords": [
|
|
54
54
|
"walkerOS",
|