@fnndsc/salsa 3.2.4

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.
Files changed (111) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +164 -0
  3. package/dist/compute/index.d.ts +17 -0
  4. package/dist/compute/index.js +33 -0
  5. package/dist/compute/index.js.map +1 -0
  6. package/dist/connect/index.d.ts +25 -0
  7. package/dist/connect/index.js +27 -0
  8. package/dist/connect/index.js.map +1 -0
  9. package/dist/context/index.d.ts +38 -0
  10. package/dist/context/index.js +58 -0
  11. package/dist/context/index.js.map +1 -0
  12. package/dist/feeds/index.d.ts +60 -0
  13. package/dist/feeds/index.js +101 -0
  14. package/dist/feeds/index.js.map +1 -0
  15. package/dist/files/index.d.ts +179 -0
  16. package/dist/files/index.js +562 -0
  17. package/dist/files/index.js.map +1 -0
  18. package/dist/files/pacs_content.d.ts +29 -0
  19. package/dist/files/pacs_content.js +121 -0
  20. package/dist/files/pacs_content.js.map +1 -0
  21. package/dist/files/pipeline_content.d.ts +22 -0
  22. package/dist/files/pipeline_content.js +31 -0
  23. package/dist/files/pipeline_content.js.map +1 -0
  24. package/dist/files/regular_content.d.ts +33 -0
  25. package/dist/files/regular_content.js +177 -0
  26. package/dist/files/regular_content.js.map +1 -0
  27. package/dist/groups/index.d.ts +21 -0
  28. package/dist/groups/index.js +37 -0
  29. package/dist/groups/index.js.map +1 -0
  30. package/dist/index.d.ts +21 -0
  31. package/dist/index.js +42 -0
  32. package/dist/index.js.map +1 -0
  33. package/dist/jobs/index.d.ts +6 -0
  34. package/dist/jobs/index.js +17 -0
  35. package/dist/jobs/index.js.map +1 -0
  36. package/dist/jobs/jobOps.d.ts +108 -0
  37. package/dist/jobs/jobOps.js +307 -0
  38. package/dist/jobs/jobOps.js.map +1 -0
  39. package/dist/pacs/index.d.ts +64 -0
  40. package/dist/pacs/index.js +91 -0
  41. package/dist/pacs/index.js.map +1 -0
  42. package/dist/pacs/resultDecode.d.ts +13 -0
  43. package/dist/pacs/resultDecode.js +19 -0
  44. package/dist/pacs/resultDecode.js.map +1 -0
  45. package/dist/pipelines/index.d.ts +58 -0
  46. package/dist/pipelines/index.js +194 -0
  47. package/dist/pipelines/index.js.map +1 -0
  48. package/dist/plugininstances/index.d.ts +15 -0
  49. package/dist/plugininstances/index.js +27 -0
  50. package/dist/plugininstances/index.js.map +1 -0
  51. package/dist/pluginmetas/index.d.ts +21 -0
  52. package/dist/pluginmetas/index.js +37 -0
  53. package/dist/pluginmetas/index.js.map +1 -0
  54. package/dist/plugins/index.d.ts +118 -0
  55. package/dist/plugins/index.js +247 -0
  56. package/dist/plugins/index.js.map +1 -0
  57. package/dist/plugins/internal/plugin_executeContinueFeed.d.ts +17 -0
  58. package/dist/plugins/internal/plugin_executeContinueFeed.js +65 -0
  59. package/dist/plugins/internal/plugin_executeContinueFeed.js.map +1 -0
  60. package/dist/plugins/internal/plugin_executeNewFeed.d.ts +32 -0
  61. package/dist/plugins/internal/plugin_executeNewFeed.js +97 -0
  62. package/dist/plugins/internal/plugin_executeNewFeed.js.map +1 -0
  63. package/dist/plugins/peer_search.d.ts +65 -0
  64. package/dist/plugins/peer_search.js +94 -0
  65. package/dist/plugins/peer_search.js.map +1 -0
  66. package/dist/plugins/plugin_executeInPlace.d.ts +69 -0
  67. package/dist/plugins/plugin_executeInPlace.js +66 -0
  68. package/dist/plugins/plugin_executeInPlace.js.map +1 -0
  69. package/dist/plugins/plugin_register.d.ts +64 -0
  70. package/dist/plugins/plugin_register.js +121 -0
  71. package/dist/plugins/plugin_register.js.map +1 -0
  72. package/dist/plugins/store_import.d.ts +64 -0
  73. package/dist/plugins/store_import.js +196 -0
  74. package/dist/plugins/store_import.js.map +1 -0
  75. package/dist/store/index.d.ts +15 -0
  76. package/dist/store/index.js +37 -0
  77. package/dist/store/index.js.map +1 -0
  78. package/dist/tags/index.d.ts +21 -0
  79. package/dist/tags/index.js +37 -0
  80. package/dist/tags/index.js.map +1 -0
  81. package/dist/vfs/dispatcher.d.ts +83 -0
  82. package/dist/vfs/dispatcher.js +192 -0
  83. package/dist/vfs/dispatcher.js.map +1 -0
  84. package/dist/vfs/index.d.ts +9 -0
  85. package/dist/vfs/index.js +26 -0
  86. package/dist/vfs/index.js.map +1 -0
  87. package/dist/vfs/provider.d.ts +80 -0
  88. package/dist/vfs/provider.js +11 -0
  89. package/dist/vfs/provider.js.map +1 -0
  90. package/dist/vfs/providers/etc.d.ts +44 -0
  91. package/dist/vfs/providers/etc.js +119 -0
  92. package/dist/vfs/providers/etc.js.map +1 -0
  93. package/dist/vfs/providers/native.d.ts +34 -0
  94. package/dist/vfs/providers/native.js +168 -0
  95. package/dist/vfs/providers/native.js.map +1 -0
  96. package/dist/vfs/providers/pacs.d.ts +56 -0
  97. package/dist/vfs/providers/pacs.js +413 -0
  98. package/dist/vfs/providers/pacs.js.map +1 -0
  99. package/dist/vfs/providers/pacsHelpers.d.ts +27 -0
  100. package/dist/vfs/providers/pacsHelpers.js +108 -0
  101. package/dist/vfs/providers/pacsHelpers.js.map +1 -0
  102. package/dist/vfs/providers/pacs_content.d.ts +27 -0
  103. package/dist/vfs/providers/pacs_content.js +137 -0
  104. package/dist/vfs/providers/pacs_content.js.map +1 -0
  105. package/dist/vfs/providers/proc.d.ts +62 -0
  106. package/dist/vfs/providers/proc.js +478 -0
  107. package/dist/vfs/providers/proc.js.map +1 -0
  108. package/dist/workflows/index.d.ts +21 -0
  109. package/dist/workflows/index.js +37 -0
  110. package/dist/workflows/index.js.map +1 -0
  111. package/package.json +57 -0
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @file Tag resource operations.
3
+ * @module
4
+ */
5
+ import { FilteredResourceData, ListOptions } from '@fnndsc/cumin';
6
+ /**
7
+ * Lists tags (single page).
8
+ *
9
+ * @param options - Search and pagination options.
10
+ */
11
+ export declare function tags_list(options: ListOptions): Promise<FilteredResourceData | null>;
12
+ /**
13
+ * Lists all tags across all pages.
14
+ *
15
+ * @param options - Search options (limit/offset managed internally).
16
+ */
17
+ export declare function tags_listAll(options?: Partial<ListOptions>): Promise<FilteredResourceData | null>;
18
+ /**
19
+ * Returns available field names for tags.
20
+ */
21
+ export declare function tagFields_get(): Promise<string[] | null>;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ /**
3
+ * @file Tag resource operations.
4
+ * @module
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.tags_list = tags_list;
8
+ exports.tags_listAll = tags_listAll;
9
+ exports.tagFields_get = tagFields_get;
10
+ const cumin_1 = require("@fnndsc/cumin");
11
+ /**
12
+ * Lists tags (single page).
13
+ *
14
+ * @param options - Search and pagination options.
15
+ */
16
+ async function tags_list(options) {
17
+ const group = new cumin_1.ChRISTagGroup();
18
+ return await group.asset.resources_listAndFilterByOptions(options);
19
+ }
20
+ /**
21
+ * Lists all tags across all pages.
22
+ *
23
+ * @param options - Search options (limit/offset managed internally).
24
+ */
25
+ async function tags_listAll(options = {}) {
26
+ const group = new cumin_1.ChRISTagGroup();
27
+ return await group.asset.resources_getAll(options);
28
+ }
29
+ /**
30
+ * Returns available field names for tags.
31
+ */
32
+ async function tagFields_get() {
33
+ const group = new cumin_1.ChRISTagGroup();
34
+ const result = await group.asset.resourceFields_get();
35
+ return result ? result.fields : null;
36
+ }
37
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tags/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AASH,8BAGC;AAOD,oCAGC;AAKD,sCAIC;AA7BD,yCAAiF;AAEjF;;;;GAIG;AACI,KAAK,UAAU,SAAS,CAAC,OAAoB;IAClD,MAAM,KAAK,GAAkB,IAAI,qBAAa,EAAE,CAAC;IACjD,OAAO,MAAM,KAAK,CAAC,KAAK,CAAC,gCAAgC,CAAC,OAAO,CAAC,CAAC;AACrE,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,YAAY,CAAC,UAAgC,EAAE;IACnE,MAAM,KAAK,GAAkB,IAAI,qBAAa,EAAE,CAAC;IACjD,OAAO,MAAM,KAAK,CAAC,KAAK,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;AACrD,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,aAAa;IACjC,MAAM,KAAK,GAAkB,IAAI,qBAAa,EAAE,CAAC;IACjD,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC,kBAAkB,EAAE,CAAC;IACtD,OAAO,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;AACvC,CAAC"}
@@ -0,0 +1,83 @@
1
+ /**
2
+ * @file VFS Dispatcher Registry.
3
+ *
4
+ * Directs filesystem requests to the matched VFSProvider instance.
5
+ * Matches specific prefix paths first, falling back to Native.
6
+ *
7
+ * @module
8
+ */
9
+ import { Result } from "@fnndsc/cumin";
10
+ import { VFSProvider, VFSItem, CpOptions } from "./provider.js";
11
+ /**
12
+ * Registry and dispatcher routing filesystem commands to matched VFS providers.
13
+ */
14
+ export declare class VFSDispatcher {
15
+ private providers;
16
+ private defaultProvider;
17
+ private pathResolver?;
18
+ /**
19
+ * Initializes dispatcher and registers standard providers.
20
+ */
21
+ constructor();
22
+ /**
23
+ * Registers a path resolution hook that maps logical paths to physical paths.
24
+ *
25
+ * @param resolver - The resolver function mapping a logical path to a physical path.
26
+ */
27
+ pathResolver_register(resolver: (path: string) => Promise<string>): void;
28
+ /**
29
+ * Registers a new VFS Provider.
30
+ *
31
+ * @param provider - The provider instance to register.
32
+ */
33
+ provider_register(provider: VFSProvider): void;
34
+ /**
35
+ * Returns all registered providers (excluding the default native provider).
36
+ * Used by callers that need to detect parent-of-prefix paths.
37
+ */
38
+ providers_get(): VFSProvider[];
39
+ /**
40
+ * Resolves the matching provider for a given virtual path.
41
+ *
42
+ * @param pathStr - The absolute virtual path.
43
+ * @returns The matching VFSProvider or the default native provider.
44
+ */
45
+ provider_get(pathStr: string): VFSProvider;
46
+ /**
47
+ * Dispatches directory listing to matched provider.
48
+ * Supports dynamic intermediate parent path synthesis for virtual prefixes.
49
+ *
50
+ * @param pathStr - The absolute virtual path to list.
51
+ * @param options - Sort controls.
52
+ * @returns Promise resolving to Result<VFSItem[]>.
53
+ */
54
+ list(pathStr: string, options?: {
55
+ sort?: "name" | "size" | "date" | "owner";
56
+ reverse?: boolean;
57
+ }): Promise<Result<VFSItem[]>>;
58
+ /**
59
+ * Dispatches copy operation to matched provider.
60
+ *
61
+ * @param src - Source path.
62
+ * @param dest - Destination path.
63
+ * @param options - Copy options.
64
+ * @returns Promise resolving to success boolean.
65
+ */
66
+ cp(src: string, dest: string, options: CpOptions): Promise<boolean>;
67
+ /**
68
+ * Dispatches file read operation to the matched provider.
69
+ *
70
+ * @param pathStr - The absolute virtual path of the file to read.
71
+ * @returns A Promise resolving to a Result containing the file contents as a string.
72
+ */
73
+ read(pathStr: string): Promise<Result<string>>;
74
+ /**
75
+ * Dispatches binary file read operation to the matched provider.
76
+ *
77
+ * @param pathStr - The absolute virtual path of the file to read.
78
+ * @returns A Promise resolving to a Result containing the file contents as a Buffer.
79
+ */
80
+ readBinary(pathStr: string): Promise<Result<Buffer>>;
81
+ }
82
+ /** Global instance of VFSDispatcher singleton. */
83
+ export declare const vfsDispatcher: VFSDispatcher;
@@ -0,0 +1,192 @@
1
+ "use strict";
2
+ /**
3
+ * @file VFS Dispatcher Registry.
4
+ *
5
+ * Directs filesystem requests to the matched VFSProvider instance.
6
+ * Matches specific prefix paths first, falling back to Native.
7
+ *
8
+ * @module
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.vfsDispatcher = exports.VFSDispatcher = void 0;
12
+ const cumin_1 = require("@fnndsc/cumin");
13
+ const native_js_1 = require("./providers/native.js");
14
+ const pacs_js_1 = require("./providers/pacs.js");
15
+ const etc_js_1 = require("./providers/etc.js");
16
+ const proc_js_1 = require("./providers/proc.js");
17
+ /**
18
+ * Registry and dispatcher routing filesystem commands to matched VFS providers.
19
+ */
20
+ class VFSDispatcher {
21
+ providers = [];
22
+ defaultProvider;
23
+ pathResolver;
24
+ /**
25
+ * Initializes dispatcher and registers standard providers.
26
+ */
27
+ constructor() {
28
+ this.defaultProvider = new native_js_1.NativeVfsProvider();
29
+ this.provider_register(new pacs_js_1.PacsVfsProvider());
30
+ this.provider_register(new etc_js_1.EtcVfsProvider());
31
+ this.provider_register(new proc_js_1.ProcVfsProvider());
32
+ }
33
+ /**
34
+ * Registers a path resolution hook that maps logical paths to physical paths.
35
+ *
36
+ * @param resolver - The resolver function mapping a logical path to a physical path.
37
+ */
38
+ pathResolver_register(resolver) {
39
+ this.pathResolver = resolver;
40
+ }
41
+ /**
42
+ * Registers a new VFS Provider.
43
+ *
44
+ * @param provider - The provider instance to register.
45
+ */
46
+ provider_register(provider) {
47
+ this.providers.push(provider);
48
+ // Sort by prefix length descending to match most specific prefix first
49
+ this.providers.sort((a, b) => b.prefix.length - a.prefix.length);
50
+ }
51
+ /**
52
+ * Returns all registered providers (excluding the default native provider).
53
+ * Used by callers that need to detect parent-of-prefix paths.
54
+ */
55
+ providers_get() {
56
+ return [...this.providers];
57
+ }
58
+ /**
59
+ * Resolves the matching provider for a given virtual path.
60
+ *
61
+ * @param pathStr - The absolute virtual path.
62
+ * @returns The matching VFSProvider or the default native provider.
63
+ */
64
+ provider_get(pathStr) {
65
+ const absolutePath = pathStr.startsWith("/") ? pathStr : "/" + pathStr;
66
+ const match = this.providers.find((p) => absolutePath === p.prefix || absolutePath.startsWith(p.prefix + "/"));
67
+ return match || this.defaultProvider;
68
+ }
69
+ /**
70
+ * Dispatches directory listing to matched provider.
71
+ * Supports dynamic intermediate parent path synthesis for virtual prefixes.
72
+ *
73
+ * @param pathStr - The absolute virtual path to list.
74
+ * @param options - Sort controls.
75
+ * @returns Promise resolving to Result<VFSItem[]>.
76
+ */
77
+ async list(pathStr, options) {
78
+ const absolutePath = pathStr.startsWith("/") ? pathStr : "/" + pathStr;
79
+ const cleanPath = absolutePath.endsWith("/") && absolutePath.length > 1 ? absolutePath.slice(0, -1) : absolutePath;
80
+ // Check if cleanPath is a parent of any registered provider's prefix
81
+ const prefixParent = cleanPath === "/" ? "/" : cleanPath + "/";
82
+ const children = this.providers.filter((p) => p.prefix.startsWith(prefixParent));
83
+ if (children.length > 0) {
84
+ const segmentIndex = cleanPath === "/" ? 1 : cleanPath.split("/").length;
85
+ const virtualSubdirs = new Set();
86
+ for (const p of children) {
87
+ const segments = p.prefix.split("/");
88
+ const nextSegment = segments[segmentIndex];
89
+ if (nextSegment) {
90
+ virtualSubdirs.add(nextSegment);
91
+ }
92
+ }
93
+ if (virtualSubdirs.size > 0) {
94
+ const vfsItems = Array.from(virtualSubdirs).map((name) => ({
95
+ name,
96
+ type: "vfs",
97
+ size: 0,
98
+ owner: "root",
99
+ date: new Date().toISOString(),
100
+ }));
101
+ // Query the default provider to see if there are any native items in this folder
102
+ let resolvedPathStr = pathStr;
103
+ if (this.pathResolver) {
104
+ try {
105
+ resolvedPathStr = await this.pathResolver(pathStr);
106
+ }
107
+ catch (e) {
108
+ // Fall back cleanly to the original path on failure
109
+ }
110
+ }
111
+ const nativeResult = await this.defaultProvider.list(resolvedPathStr, options);
112
+ if (nativeResult.ok && nativeResult.value) {
113
+ const nativeItems = nativeResult.value;
114
+ for (const item of nativeItems) {
115
+ if (!virtualSubdirs.has(item.name)) {
116
+ vfsItems.push(item);
117
+ }
118
+ }
119
+ }
120
+ return (0, cumin_1.Ok)(vfsItems);
121
+ }
122
+ }
123
+ const provider = this.provider_get(pathStr);
124
+ if (provider === this.defaultProvider && this.pathResolver) {
125
+ try {
126
+ const resolvedPath = await this.pathResolver(pathStr);
127
+ return provider.list(resolvedPath, options);
128
+ }
129
+ catch (e) {
130
+ // Fall back cleanly to the original path on failure
131
+ }
132
+ }
133
+ return provider.list(pathStr, options);
134
+ }
135
+ /**
136
+ * Dispatches copy operation to matched provider.
137
+ *
138
+ * @param src - Source path.
139
+ * @param dest - Destination path.
140
+ * @param options - Copy options.
141
+ * @returns Promise resolving to success boolean.
142
+ */
143
+ async cp(src, dest, options) {
144
+ const provider = this.provider_get(src);
145
+ if (provider === this.defaultProvider && this.pathResolver) {
146
+ let resolvedSrc = src;
147
+ let resolvedDest = dest;
148
+ try {
149
+ resolvedSrc = await this.pathResolver(src);
150
+ }
151
+ catch (e) { }
152
+ try {
153
+ resolvedDest = await this.pathResolver(dest);
154
+ }
155
+ catch (e) { }
156
+ return provider.cp(resolvedSrc, resolvedDest, options);
157
+ }
158
+ return provider.cp(src, dest, options);
159
+ }
160
+ /**
161
+ * Dispatches file read operation to the matched provider.
162
+ *
163
+ * @param pathStr - The absolute virtual path of the file to read.
164
+ * @returns A Promise resolving to a Result containing the file contents as a string.
165
+ */
166
+ async read(pathStr) {
167
+ const provider = this.provider_get(pathStr);
168
+ if (provider !== this.defaultProvider && provider.read) {
169
+ return provider.read(pathStr);
170
+ }
171
+ cumin_1.errorStack.stack_push("error", `File read not supported for path: ${pathStr}`);
172
+ return (0, cumin_1.Err)();
173
+ }
174
+ /**
175
+ * Dispatches binary file read operation to the matched provider.
176
+ *
177
+ * @param pathStr - The absolute virtual path of the file to read.
178
+ * @returns A Promise resolving to a Result containing the file contents as a Buffer.
179
+ */
180
+ async readBinary(pathStr) {
181
+ const provider = this.provider_get(pathStr);
182
+ if (provider !== this.defaultProvider && provider.readBinary) {
183
+ return provider.readBinary(pathStr);
184
+ }
185
+ cumin_1.errorStack.stack_push("error", `Binary file read not supported for path: ${pathStr}`);
186
+ return (0, cumin_1.Err)();
187
+ }
188
+ }
189
+ exports.VFSDispatcher = VFSDispatcher;
190
+ /** Global instance of VFSDispatcher singleton. */
191
+ exports.vfsDispatcher = new VFSDispatcher();
192
+ //# sourceMappingURL=dispatcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dispatcher.js","sourceRoot":"","sources":["../../src/vfs/dispatcher.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;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KG;IACH,KAAK,CAAC,IAAI,CAAC,OAAe;QACxB,MAAM,QAAQ,GAAgB,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QACzD,IAAI,QAAQ,KAAK,IAAI,CAAC,eAAe,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;YACvD,OAAO,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAChC,CAAC;QACD,kBAAU,CAAC,UAAU,CAAC,OAAO,EAAE,qCAAqC,OAAO,EAAE,CAAC,CAAC;QAC/E,OAAO,IAAA,WAAG,GAAE,CAAC;IACf,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,UAAU,CAAC,OAAe;QAC9B,MAAM,QAAQ,GAAgB,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QACzD,IAAI,QAAQ,KAAK,IAAI,CAAC,eAAe,IAAI,QAAQ,CAAC,UAAU,EAAE,CAAC;YAC7D,OAAO,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QACtC,CAAC;QACD,kBAAU,CAAC,UAAU,CAAC,OAAO,EAAE,4CAA4C,OAAO,EAAE,CAAC,CAAC;QACtF,OAAO,IAAA,WAAG,GAAE,CAAC;IACf,CAAC;CACF;AA3LD,sCA2LC;AAED,kDAAkD;AACrC,QAAA,aAAa,GAAkB,IAAI,aAAa,EAAE,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @file VFS module exports.
3
+ * @module
4
+ */
5
+ export * from "./provider.js";
6
+ export * from "./dispatcher.js";
7
+ export * from "./providers/native.js";
8
+ export * from "./providers/pacs.js";
9
+ export * from "./providers/etc.js";
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ /**
3
+ * @file VFS module exports.
4
+ * @module
5
+ */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
18
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
19
+ };
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ __exportStar(require("./provider.js"), exports);
22
+ __exportStar(require("./dispatcher.js"), exports);
23
+ __exportStar(require("./providers/native.js"), exports);
24
+ __exportStar(require("./providers/pacs.js"), exports);
25
+ __exportStar(require("./providers/etc.js"), exports);
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/vfs/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;AAEH,gDAA8B;AAC9B,kDAAgC;AAChC,wDAAsC;AACtC,sDAAoC;AACpC,qDAAmC"}
@@ -0,0 +1,80 @@
1
+ /**
2
+ * @file VFS Provider contracts and item interfaces.
3
+ *
4
+ * Defines the standard VFSItem, CpOptions, and VFSProvider interfaces
5
+ * to support extensible virtual file systems.
6
+ *
7
+ * @module
8
+ */
9
+ import { Result } from "@fnndsc/cumin";
10
+ /**
11
+ * Standard interface representing a virtual file system item.
12
+ */
13
+ export interface VFSItem {
14
+ /** The display name of the item. */
15
+ name: string;
16
+ /** The type of the item. */
17
+ type: "dir" | "file" | "link" | "plugin" | "pipeline" | "vfs" | "job";
18
+ /** Size in bytes. */
19
+ size: number;
20
+ /** Username of the owner. */
21
+ owner: string;
22
+ /** Creation date (ISO string). */
23
+ date: string;
24
+ /** Target path (for links). */
25
+ target?: string;
26
+ /** Version string (for plugins). */
27
+ version?: string;
28
+ /** Title or description (for feeds, queries). */
29
+ title?: string;
30
+ /** Execution status (for job type items). */
31
+ status?: string;
32
+ }
33
+ /**
34
+ * Options for VFS copy operations.
35
+ */
36
+ export interface CpOptions {
37
+ /** Recursively copy subdirectories. */
38
+ recursive?: boolean;
39
+ }
40
+ /**
41
+ * Base contract that every Virtual File System Provider must implement.
42
+ */
43
+ export interface VFSProvider {
44
+ /** The path prefix this provider matches (e.g. '/pacs', '/bin', '/'). */
45
+ prefix: string;
46
+ /**
47
+ * Lists the contents of a directory matching this provider.
48
+ *
49
+ * @param path - The absolute virtual directory path.
50
+ * @param options - Optional sorting controls.
51
+ * @returns A Promise resolving to a Result containing VFSItems.
52
+ */
53
+ list(path: string, options?: {
54
+ sort?: "name" | "size" | "date" | "owner";
55
+ reverse?: boolean;
56
+ }): Promise<Result<VFSItem[]>>;
57
+ /**
58
+ * Copies files or folders from/to paths under this provider.
59
+ *
60
+ * @param src - The absolute source path.
61
+ * @param dest - The absolute destination path.
62
+ * @param options - Copy flags like recursive.
63
+ * @returns A Promise resolving to true on successful copy execution.
64
+ */
65
+ cp(src: string, dest: string, options: CpOptions): Promise<boolean>;
66
+ /**
67
+ * Reads the content of a virtual file under this provider as a string.
68
+ *
69
+ * @param path - The absolute virtual path of the file to read.
70
+ * @returns A Promise resolving to a Result containing the file contents as a string.
71
+ */
72
+ read?(path: string): Promise<Result<string>>;
73
+ /**
74
+ * Reads the content of a virtual file under this provider as a binary Buffer.
75
+ *
76
+ * @param path - The absolute virtual path of the file to read.
77
+ * @returns A Promise resolving to a Result containing the file contents as a Buffer.
78
+ */
79
+ readBinary?(path: string): Promise<Result<Buffer>>;
80
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ /**
3
+ * @file VFS Provider contracts and item interfaces.
4
+ *
5
+ * Defines the standard VFSItem, CpOptions, and VFSProvider interfaces
6
+ * to support extensible virtual file systems.
7
+ *
8
+ * @module
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ //# sourceMappingURL=provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.js","sourceRoot":"","sources":["../../src/vfs/provider.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @file /etc virtual filesystem provider.
3
+ *
4
+ * Exposes ChRIS resources as Unix-style /etc files:
5
+ * /etc/compute.yaml — compute resources (YAML)
6
+ * /etc/group — groups (/etc/group format)
7
+ * /etc/passwd — current user (/etc/passwd format)
8
+ * /etc/cube — CUBE connection info (YAML)
9
+ *
10
+ * @module
11
+ */
12
+ import { Result } from '@fnndsc/cumin';
13
+ import { VFSProvider, VFSItem, CpOptions } from '../provider.js';
14
+ /**
15
+ * VFS provider for /etc — maps ChRIS API resources to Unix-style config files.
16
+ */
17
+ export declare class EtcVfsProvider implements VFSProvider {
18
+ prefix: string;
19
+ /**
20
+ * Lists contents of /etc — the four virtual config files.
21
+ *
22
+ * @param path - Must be '/etc'.
23
+ * @returns VFSItems for each /etc file.
24
+ */
25
+ list(_path: string, _options?: {
26
+ sort?: 'name' | 'size' | 'date' | 'owner';
27
+ reverse?: boolean;
28
+ }): Promise<Result<VFSItem[]>>;
29
+ /**
30
+ * Read is not supported for /etc as a directory — individual files via read().
31
+ */
32
+ cp(_src: string, _dest: string, _options: CpOptions): Promise<boolean>;
33
+ /**
34
+ * Reads a virtual /etc file and returns its content as a string.
35
+ *
36
+ * @param path - Absolute path like /etc/compute.yaml.
37
+ * @returns File content string or Err.
38
+ */
39
+ read(path: string): Promise<Result<string>>;
40
+ private computeYaml_render;
41
+ private group_render;
42
+ private passwd_render;
43
+ private cube_render;
44
+ }
@@ -0,0 +1,119 @@
1
+ "use strict";
2
+ /**
3
+ * @file /etc virtual filesystem provider.
4
+ *
5
+ * Exposes ChRIS resources as Unix-style /etc files:
6
+ * /etc/compute.yaml — compute resources (YAML)
7
+ * /etc/group — groups (/etc/group format)
8
+ * /etc/passwd — current user (/etc/passwd format)
9
+ * /etc/cube — CUBE connection info (YAML)
10
+ *
11
+ * @module
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.EtcVfsProvider = void 0;
15
+ const cumin_1 = require("@fnndsc/cumin");
16
+ const cumin_2 = require("@fnndsc/cumin");
17
+ /** Virtual files exposed under /etc. */
18
+ const ETC_FILES = ['compute.yaml', 'group', 'passwd', 'cube'];
19
+ /**
20
+ * VFS provider for /etc — maps ChRIS API resources to Unix-style config files.
21
+ */
22
+ class EtcVfsProvider {
23
+ prefix = '/etc';
24
+ /**
25
+ * Lists contents of /etc — the four virtual config files.
26
+ *
27
+ * @param path - Must be '/etc'.
28
+ * @returns VFSItems for each /etc file.
29
+ */
30
+ async list(_path, _options) {
31
+ const now = new Date().toISOString();
32
+ const items = ETC_FILES.map((name) => ({
33
+ name,
34
+ type: 'file',
35
+ size: 0,
36
+ owner: 'root',
37
+ date: now,
38
+ }));
39
+ return (0, cumin_1.Ok)(items);
40
+ }
41
+ /**
42
+ * Read is not supported for /etc as a directory — individual files via read().
43
+ */
44
+ async cp(_src, _dest, _options) {
45
+ cumin_1.errorStack.stack_push('error', 'cp: /etc is a read-only virtual directory');
46
+ return false;
47
+ }
48
+ /**
49
+ * Reads a virtual /etc file and returns its content as a string.
50
+ *
51
+ * @param path - Absolute path like /etc/compute.yaml.
52
+ * @returns File content string or Err.
53
+ */
54
+ async read(path) {
55
+ const filename = path.split('/').pop() ?? '';
56
+ switch (filename) {
57
+ case 'compute.yaml':
58
+ return this.computeYaml_render();
59
+ case 'group':
60
+ return this.group_render();
61
+ case 'passwd':
62
+ return this.passwd_render();
63
+ case 'cube':
64
+ return this.cube_render();
65
+ default:
66
+ cumin_1.errorStack.stack_push('error', `${path}: No such file`);
67
+ return (0, cumin_1.Err)();
68
+ }
69
+ }
70
+ async computeYaml_render() {
71
+ const result = await (0, cumin_2.computeResources_getAll)();
72
+ if (!result.ok)
73
+ return (0, cumin_1.Err)();
74
+ const lines = ['# ChRIS compute resources'];
75
+ if (result.value.length === 0) {
76
+ lines.push('# (none)');
77
+ }
78
+ else {
79
+ for (const r of result.value) {
80
+ lines.push(`- id: ${r.id}`);
81
+ lines.push(` name: ${r.name}`);
82
+ lines.push(` compute_url: ${r.compute_url ?? ''}`);
83
+ if (r.description)
84
+ lines.push(` description: ${r.description}`);
85
+ }
86
+ }
87
+ return (0, cumin_1.Ok)(lines.join('\n') + '\n');
88
+ }
89
+ async group_render() {
90
+ const result = await (0, cumin_2.groups_getAll)();
91
+ if (!result.ok)
92
+ return (0, cumin_1.Err)();
93
+ const lines = result.value.map((g) => `${g.name}:x:${g.id}:`);
94
+ return (0, cumin_1.Ok)(lines.join('\n') + '\n');
95
+ }
96
+ async passwd_render() {
97
+ const result = await (0, cumin_2.currentUser_get)();
98
+ if (!result.ok)
99
+ return (0, cumin_1.Err)();
100
+ const u = result.value;
101
+ const uid = u.id ?? 0;
102
+ const home = `/home/${u.username}`;
103
+ const gecos = u.email ?? '';
104
+ const line = `${u.username}:x:${uid}:${uid}:${gecos}:${home}:chell`;
105
+ return (0, cumin_1.Ok)(line + '\n');
106
+ }
107
+ async cube_render() {
108
+ const url = await cumin_2.chrisContext.ChRISURL_get();
109
+ const user = await cumin_2.chrisContext.ChRISuser_get();
110
+ const lines = [
111
+ '# ChRIS CUBE connection',
112
+ `url: ${url ?? '(not connected)'}`,
113
+ `user: ${user ?? '(not connected)'}`,
114
+ ];
115
+ return (0, cumin_1.Ok)(lines.join('\n') + '\n');
116
+ }
117
+ }
118
+ exports.EtcVfsProvider = EtcVfsProvider;
119
+ //# sourceMappingURL=etc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"etc.js","sourceRoot":"","sources":["../../../src/vfs/providers/etc.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAEH,yCAA4D;AAC5D,yCAQuB;AAGvB,wCAAwC;AACxC,MAAM,SAAS,GAAa,CAAC,cAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AAExE;;GAEG;AACH,MAAa,cAAc;IACzB,MAAM,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