resourcexjs 1.0.0 → 1.2.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 +29 -19
- package/dist/arp.js +168 -123
- package/dist/arp.js.map +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4373 -338
- package/dist/index.js.map +7 -7
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -81,25 +81,31 @@ manifest.toJSON(); // → plain object
|
|
|
81
81
|
|
|
82
82
|
### RXC - Resource Content
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
Archive-based content (internally tar.gz), supports single or multi-file resources:
|
|
85
85
|
|
|
86
86
|
```typescript
|
|
87
|
-
import { createRXC
|
|
88
|
-
|
|
89
|
-
//
|
|
90
|
-
const content = createRXC("Hello");
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
//
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
87
|
+
import { createRXC } from "resourcexjs";
|
|
88
|
+
|
|
89
|
+
// Single file
|
|
90
|
+
const content = await createRXC({ content: "Hello, World!" });
|
|
91
|
+
|
|
92
|
+
// Multiple files
|
|
93
|
+
const content = await createRXC({
|
|
94
|
+
"index.ts": "export default 1",
|
|
95
|
+
"styles.css": "body {}",
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
// Nested directories
|
|
99
|
+
const content = await createRXC({
|
|
100
|
+
"src/index.ts": "main code",
|
|
101
|
+
"src/utils/helper.ts": "helper code",
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
// Read files
|
|
105
|
+
const buffer = await content.file("content"); // single file → Buffer
|
|
106
|
+
const files = await content.files(); // all files → Map<string, Buffer>
|
|
107
|
+
const archiveBuffer = await content.buffer(); // raw tar.gz
|
|
108
|
+
const stream = content.stream; // tar.gz ReadableStream
|
|
103
109
|
```
|
|
104
110
|
|
|
105
111
|
### RXR - Resource
|
|
@@ -141,8 +147,8 @@ const exists = await registry.exists("localhost/test.text@1.0.0");
|
|
|
141
147
|
// Delete
|
|
142
148
|
await registry.delete("localhost/test.text@1.0.0");
|
|
143
149
|
|
|
144
|
-
// Search
|
|
145
|
-
const results = await registry.search("assistant");
|
|
150
|
+
// Search
|
|
151
|
+
const results = await registry.search({ query: "assistant", limit: 10 });
|
|
146
152
|
```
|
|
147
153
|
|
|
148
154
|
### Resource Types
|
|
@@ -211,6 +217,10 @@ const arl = arp.parse("arp:text:file://./config.txt");
|
|
|
211
217
|
const resource = await arl.resolve();
|
|
212
218
|
console.log(resource.content); // string
|
|
213
219
|
|
|
220
|
+
// Read with params (e.g., directory listing)
|
|
221
|
+
const dirArl = arp.parse("arp:text:file://./data");
|
|
222
|
+
const dir = await dirArl.resolve({ recursive: "true", pattern: "*.json" });
|
|
223
|
+
|
|
214
224
|
// Write
|
|
215
225
|
await arl.deposit("hello world");
|
|
216
226
|
|
package/dist/arp.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// ../arp/dist/index.js
|
|
2
|
-
import { readFile, writeFile, readdir, mkdir, rm, access, stat
|
|
3
|
-
import { resolve, dirname } from "node:path";
|
|
2
|
+
import { readFile, writeFile, readdir, mkdir, rm, access, stat } from "node:fs/promises";
|
|
3
|
+
import { resolve, dirname, join } from "node:path";
|
|
4
4
|
|
|
5
5
|
class ARPError extends Error {
|
|
6
6
|
constructor(message, options) {
|
|
@@ -47,25 +47,26 @@ class ARL {
|
|
|
47
47
|
this.location = location;
|
|
48
48
|
this.resolver = resolver;
|
|
49
49
|
}
|
|
50
|
-
createContext() {
|
|
50
|
+
createContext(params) {
|
|
51
51
|
return {
|
|
52
52
|
url: this.toString(),
|
|
53
53
|
semantic: this.semantic,
|
|
54
54
|
transport: this.transport,
|
|
55
55
|
location: this.location,
|
|
56
|
-
timestamp: new Date
|
|
56
|
+
timestamp: new Date,
|
|
57
|
+
params
|
|
57
58
|
};
|
|
58
59
|
}
|
|
59
|
-
async resolve() {
|
|
60
|
+
async resolve(params) {
|
|
60
61
|
const transport = this.resolver.getTransportHandler(this.transport);
|
|
61
62
|
const semantic = this.resolver.getSemanticHandler(this.semantic);
|
|
62
|
-
const context = this.createContext();
|
|
63
|
+
const context = this.createContext(params);
|
|
63
64
|
return semantic.resolve(transport, this.location, context);
|
|
64
65
|
}
|
|
65
|
-
async deposit(data) {
|
|
66
|
+
async deposit(data, params) {
|
|
66
67
|
const transport = this.resolver.getTransportHandler(this.transport);
|
|
67
68
|
const semantic = this.resolver.getSemanticHandler(this.semantic);
|
|
68
|
-
const context = this.createContext();
|
|
69
|
+
const context = this.createContext(params);
|
|
69
70
|
if (!semantic.deposit) {
|
|
70
71
|
throw new SemanticError(`Semantic "${semantic.name}" does not support deposit operation`, this.semantic);
|
|
71
72
|
}
|
|
@@ -78,15 +79,7 @@ class ARL {
|
|
|
78
79
|
if (semantic.exists) {
|
|
79
80
|
return semantic.exists(transport, this.location, context);
|
|
80
81
|
}
|
|
81
|
-
|
|
82
|
-
return transport.exists(this.location);
|
|
83
|
-
}
|
|
84
|
-
try {
|
|
85
|
-
await transport.read(this.location);
|
|
86
|
-
return true;
|
|
87
|
-
} catch {
|
|
88
|
-
return false;
|
|
89
|
-
}
|
|
82
|
+
return transport.exists(this.location);
|
|
90
83
|
}
|
|
91
84
|
async delete() {
|
|
92
85
|
const transport = this.resolver.getTransportHandler(this.transport);
|
|
@@ -95,9 +88,6 @@ class ARL {
|
|
|
95
88
|
if (semantic.delete) {
|
|
96
89
|
return semantic.delete(transport, this.location, context);
|
|
97
90
|
}
|
|
98
|
-
if (!transport.delete) {
|
|
99
|
-
throw new SemanticError(`Neither semantic "${semantic.name}" nor transport "${transport.name}" supports delete operation`, this.semantic);
|
|
100
|
-
}
|
|
101
91
|
await transport.delete(this.location);
|
|
102
92
|
}
|
|
103
93
|
toString() {
|
|
@@ -107,57 +97,88 @@ class ARL {
|
|
|
107
97
|
|
|
108
98
|
class FileTransportHandler {
|
|
109
99
|
name = "file";
|
|
110
|
-
capabilities = {
|
|
111
|
-
canRead: true,
|
|
112
|
-
canWrite: true,
|
|
113
|
-
canList: true,
|
|
114
|
-
canDelete: true,
|
|
115
|
-
canStat: true
|
|
116
|
-
};
|
|
117
100
|
resolvePath(location) {
|
|
118
101
|
return resolve(process.cwd(), location);
|
|
119
102
|
}
|
|
120
|
-
async
|
|
103
|
+
async get(location, params) {
|
|
121
104
|
const filePath = this.resolvePath(location);
|
|
122
105
|
try {
|
|
123
|
-
|
|
106
|
+
const stats = await stat(filePath);
|
|
107
|
+
if (stats.isDirectory()) {
|
|
108
|
+
return this.getDirectory(filePath, stats, params);
|
|
109
|
+
} else {
|
|
110
|
+
return this.getFile(filePath, stats);
|
|
111
|
+
}
|
|
124
112
|
} catch (error) {
|
|
125
113
|
const err = error;
|
|
126
|
-
throw new TransportError(`File
|
|
114
|
+
throw new TransportError(`File get error: ${err.code} - ${filePath}`, this.name, {
|
|
127
115
|
cause: err
|
|
128
116
|
});
|
|
129
117
|
}
|
|
130
118
|
}
|
|
131
|
-
async
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
119
|
+
async getFile(filePath, stats) {
|
|
120
|
+
const content = await readFile(filePath);
|
|
121
|
+
return {
|
|
122
|
+
content,
|
|
123
|
+
metadata: {
|
|
124
|
+
type: "file",
|
|
125
|
+
size: Number(stats.size),
|
|
126
|
+
modifiedAt: stats.mtime
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
async getDirectory(dirPath, stats, params) {
|
|
131
|
+
const recursive = params?.recursive === "true";
|
|
132
|
+
const pattern = params?.pattern;
|
|
133
|
+
let entries;
|
|
134
|
+
if (recursive) {
|
|
135
|
+
entries = await this.listRecursive(dirPath, dirPath);
|
|
136
|
+
} else {
|
|
137
|
+
entries = await readdir(dirPath);
|
|
138
|
+
}
|
|
139
|
+
if (pattern) {
|
|
140
|
+
entries = this.filterByPattern(entries, pattern);
|
|
141
141
|
}
|
|
142
|
+
const content = Buffer.from(JSON.stringify(entries));
|
|
143
|
+
return {
|
|
144
|
+
content,
|
|
145
|
+
metadata: {
|
|
146
|
+
type: "directory",
|
|
147
|
+
modifiedAt: stats.mtime
|
|
148
|
+
}
|
|
149
|
+
};
|
|
142
150
|
}
|
|
143
|
-
async
|
|
144
|
-
const
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
const
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
151
|
+
async listRecursive(basePath, currentPath) {
|
|
152
|
+
const entries = await readdir(currentPath, { withFileTypes: true });
|
|
153
|
+
const results = [];
|
|
154
|
+
for (const entry of entries) {
|
|
155
|
+
const fullPath = join(currentPath, entry.name);
|
|
156
|
+
const relativePath = fullPath.substring(basePath.length + 1);
|
|
157
|
+
if (entry.isDirectory()) {
|
|
158
|
+
const subEntries = await this.listRecursive(basePath, fullPath);
|
|
159
|
+
results.push(...subEntries);
|
|
160
|
+
} else {
|
|
161
|
+
results.push(relativePath);
|
|
162
|
+
}
|
|
152
163
|
}
|
|
164
|
+
return results;
|
|
153
165
|
}
|
|
154
|
-
|
|
155
|
-
const
|
|
166
|
+
filterByPattern(entries, pattern) {
|
|
167
|
+
const regexPattern = pattern.replace(/\./g, "\\.").replace(/\*/g, ".*").replace(/\?/g, ".");
|
|
168
|
+
const regex = new RegExp(`^${regexPattern}$`);
|
|
169
|
+
return entries.filter((entry) => {
|
|
170
|
+
const filename = entry.split("/").pop() || entry;
|
|
171
|
+
return regex.test(filename);
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
async set(location, content, _params) {
|
|
175
|
+
const filePath = this.resolvePath(location);
|
|
156
176
|
try {
|
|
157
|
-
await mkdir(
|
|
177
|
+
await mkdir(dirname(filePath), { recursive: true });
|
|
178
|
+
await writeFile(filePath, content);
|
|
158
179
|
} catch (error) {
|
|
159
180
|
const err = error;
|
|
160
|
-
throw new TransportError(`
|
|
181
|
+
throw new TransportError(`File set error: ${err.code} - ${filePath}`, this.name, {
|
|
161
182
|
cause: err
|
|
162
183
|
});
|
|
163
184
|
}
|
|
@@ -171,28 +192,15 @@ class FileTransportHandler {
|
|
|
171
192
|
return false;
|
|
172
193
|
}
|
|
173
194
|
}
|
|
174
|
-
async stat(location) {
|
|
175
|
-
const filePath = this.resolvePath(location);
|
|
176
|
-
try {
|
|
177
|
-
const stats = await fsStat(filePath);
|
|
178
|
-
return {
|
|
179
|
-
size: stats.size,
|
|
180
|
-
modifiedAt: stats.mtime,
|
|
181
|
-
isDirectory: stats.isDirectory()
|
|
182
|
-
};
|
|
183
|
-
} catch (error) {
|
|
184
|
-
const err = error;
|
|
185
|
-
throw new TransportError(`File stat error: ${err.code} - ${filePath}`, this.name, {
|
|
186
|
-
cause: err
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
195
|
async delete(location) {
|
|
191
196
|
const filePath = this.resolvePath(location);
|
|
192
197
|
try {
|
|
193
198
|
await rm(filePath, { recursive: true });
|
|
194
199
|
} catch (error) {
|
|
195
200
|
const err = error;
|
|
201
|
+
if (err.code === "ENOENT") {
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
196
204
|
throw new TransportError(`File delete error: ${err.code} - ${filePath}`, this.name, {
|
|
197
205
|
cause: err
|
|
198
206
|
});
|
|
@@ -204,26 +212,31 @@ var fileTransport = new FileTransportHandler;
|
|
|
204
212
|
class HttpTransportHandler {
|
|
205
213
|
name;
|
|
206
214
|
protocol;
|
|
207
|
-
capabilities = {
|
|
208
|
-
canRead: true,
|
|
209
|
-
canWrite: false,
|
|
210
|
-
canList: false,
|
|
211
|
-
canDelete: false,
|
|
212
|
-
canStat: false
|
|
213
|
-
};
|
|
214
215
|
constructor(protocol = "https") {
|
|
215
216
|
this.protocol = protocol;
|
|
216
217
|
this.name = protocol;
|
|
217
218
|
}
|
|
218
|
-
async
|
|
219
|
-
const url =
|
|
219
|
+
async get(location, params) {
|
|
220
|
+
const url = this.buildUrl(location, params);
|
|
220
221
|
try {
|
|
221
222
|
const response = await fetch(url);
|
|
222
223
|
if (!response.ok) {
|
|
223
224
|
throw new TransportError(`HTTP ${response.status}: ${response.statusText} - ${url}`, this.name);
|
|
224
225
|
}
|
|
225
226
|
const arrayBuffer = await response.arrayBuffer();
|
|
226
|
-
|
|
227
|
+
const content = Buffer.from(arrayBuffer);
|
|
228
|
+
const contentType = response.headers.get("content-type");
|
|
229
|
+
const contentLength = response.headers.get("content-length");
|
|
230
|
+
const lastModified = response.headers.get("last-modified");
|
|
231
|
+
return {
|
|
232
|
+
content,
|
|
233
|
+
metadata: {
|
|
234
|
+
type: "file",
|
|
235
|
+
size: contentLength ? parseInt(contentLength, 10) : content.length,
|
|
236
|
+
modifiedAt: lastModified ? new Date(lastModified) : undefined,
|
|
237
|
+
contentType
|
|
238
|
+
}
|
|
239
|
+
};
|
|
227
240
|
} catch (error) {
|
|
228
241
|
if (error instanceof TransportError) {
|
|
229
242
|
throw error;
|
|
@@ -233,6 +246,30 @@ class HttpTransportHandler {
|
|
|
233
246
|
});
|
|
234
247
|
}
|
|
235
248
|
}
|
|
249
|
+
buildUrl(location, params) {
|
|
250
|
+
const url = new URL(`${this.protocol}://${location}`);
|
|
251
|
+
if (params) {
|
|
252
|
+
for (const [key, value] of Object.entries(params)) {
|
|
253
|
+
url.searchParams.set(key, value);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
return url.toString();
|
|
257
|
+
}
|
|
258
|
+
async set(_location, _content, _params) {
|
|
259
|
+
throw new TransportError("HTTP transport is read-only, set not supported", this.name);
|
|
260
|
+
}
|
|
261
|
+
async exists(location) {
|
|
262
|
+
const url = `${this.protocol}://${location}`;
|
|
263
|
+
try {
|
|
264
|
+
const response = await fetch(url, { method: "HEAD" });
|
|
265
|
+
return response.ok;
|
|
266
|
+
} catch {
|
|
267
|
+
return false;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
async delete(_location) {
|
|
271
|
+
throw new TransportError("HTTP transport is read-only, delete not supported", this.name);
|
|
272
|
+
}
|
|
236
273
|
}
|
|
237
274
|
var httpsTransport = new HttpTransportHandler("https");
|
|
238
275
|
var httpTransport = new HttpTransportHandler("http");
|
|
@@ -240,17 +277,36 @@ var httpTransport = new HttpTransportHandler("http");
|
|
|
240
277
|
class TextSemanticHandler {
|
|
241
278
|
name = "text";
|
|
242
279
|
async resolve(transport, location, context) {
|
|
243
|
-
const
|
|
244
|
-
|
|
280
|
+
const result = await transport.get(location, context.params);
|
|
281
|
+
if (result.metadata?.type === "directory") {
|
|
282
|
+
const meta2 = {
|
|
283
|
+
url: context.url,
|
|
284
|
+
semantic: context.semantic,
|
|
285
|
+
transport: context.transport,
|
|
286
|
+
location: context.location,
|
|
287
|
+
size: result.content.length,
|
|
288
|
+
encoding: "utf-8",
|
|
289
|
+
mimeType: "application/json",
|
|
290
|
+
resolvedAt: context.timestamp.toISOString(),
|
|
291
|
+
type: "directory"
|
|
292
|
+
};
|
|
293
|
+
return {
|
|
294
|
+
type: "text",
|
|
295
|
+
content: result.content.toString("utf-8"),
|
|
296
|
+
meta: meta2
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
const text = result.content.toString("utf-8");
|
|
245
300
|
const meta = {
|
|
246
301
|
url: context.url,
|
|
247
302
|
semantic: context.semantic,
|
|
248
303
|
transport: context.transport,
|
|
249
304
|
location: context.location,
|
|
250
|
-
size:
|
|
305
|
+
size: result.metadata?.size ?? result.content.length,
|
|
251
306
|
encoding: "utf-8",
|
|
252
307
|
mimeType: "text/plain",
|
|
253
|
-
resolvedAt: context.timestamp.toISOString()
|
|
308
|
+
resolvedAt: context.timestamp.toISOString(),
|
|
309
|
+
type: "file"
|
|
254
310
|
};
|
|
255
311
|
return {
|
|
256
312
|
type: "text",
|
|
@@ -258,29 +314,23 @@ class TextSemanticHandler {
|
|
|
258
314
|
meta
|
|
259
315
|
};
|
|
260
316
|
}
|
|
261
|
-
async deposit(transport, location, data,
|
|
262
|
-
if (!transport.write) {
|
|
263
|
-
throw new SemanticError(`Transport "${transport.name}" does not support write operation`, this.name);
|
|
264
|
-
}
|
|
317
|
+
async deposit(transport, location, data, context) {
|
|
265
318
|
const buffer = Buffer.from(data, "utf-8");
|
|
266
|
-
await transport.write(location, buffer);
|
|
267
|
-
}
|
|
268
|
-
async exists(transport, location, _context) {
|
|
269
|
-
if (transport.exists) {
|
|
270
|
-
return transport.exists(location);
|
|
271
|
-
}
|
|
272
319
|
try {
|
|
273
|
-
await transport.
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
return false;
|
|
320
|
+
await transport.set(location, buffer, context.params);
|
|
321
|
+
} catch (error) {
|
|
322
|
+
throw new SemanticError(`Failed to deposit text to "${location}": ${error.message}`, this.name, { cause: error });
|
|
277
323
|
}
|
|
278
324
|
}
|
|
325
|
+
async exists(transport, location, _context) {
|
|
326
|
+
return transport.exists(location);
|
|
327
|
+
}
|
|
279
328
|
async delete(transport, location, _context) {
|
|
280
|
-
|
|
281
|
-
|
|
329
|
+
try {
|
|
330
|
+
await transport.delete(location);
|
|
331
|
+
} catch (error) {
|
|
332
|
+
throw new SemanticError(`Failed to delete "${location}": ${error.message}`, this.name, { cause: error });
|
|
282
333
|
}
|
|
283
|
-
await transport.delete(location);
|
|
284
334
|
}
|
|
285
335
|
}
|
|
286
336
|
var textSemantic = new TextSemanticHandler;
|
|
@@ -303,44 +353,39 @@ function toBuffer(data) {
|
|
|
303
353
|
class BinarySemanticHandler {
|
|
304
354
|
name = "binary";
|
|
305
355
|
async resolve(transport, location, context) {
|
|
306
|
-
const
|
|
356
|
+
const result = await transport.get(location, context.params);
|
|
307
357
|
const meta = {
|
|
308
358
|
url: context.url,
|
|
309
359
|
semantic: context.semantic,
|
|
310
360
|
transport: context.transport,
|
|
311
361
|
location: context.location,
|
|
312
|
-
size:
|
|
313
|
-
resolvedAt: context.timestamp.toISOString()
|
|
362
|
+
size: result.metadata?.size ?? result.content.length,
|
|
363
|
+
resolvedAt: context.timestamp.toISOString(),
|
|
364
|
+
type: result.metadata?.type
|
|
314
365
|
};
|
|
315
366
|
return {
|
|
316
367
|
type: "binary",
|
|
317
|
-
content:
|
|
368
|
+
content: result.content,
|
|
318
369
|
meta
|
|
319
370
|
};
|
|
320
371
|
}
|
|
321
|
-
async deposit(transport, location, data,
|
|
322
|
-
if (!transport.write) {
|
|
323
|
-
throw new SemanticError(`Transport "${transport.name}" does not support write operation`, this.name);
|
|
324
|
-
}
|
|
372
|
+
async deposit(transport, location, data, context) {
|
|
325
373
|
const buffer = toBuffer(data);
|
|
326
|
-
await transport.write(location, buffer);
|
|
327
|
-
}
|
|
328
|
-
async exists(transport, location, _context) {
|
|
329
|
-
if (transport.exists) {
|
|
330
|
-
return transport.exists(location);
|
|
331
|
-
}
|
|
332
374
|
try {
|
|
333
|
-
await transport.
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
return false;
|
|
375
|
+
await transport.set(location, buffer, context.params);
|
|
376
|
+
} catch (error) {
|
|
377
|
+
throw new SemanticError(`Failed to deposit binary to "${location}": ${error.message}`, this.name, { cause: error });
|
|
337
378
|
}
|
|
338
379
|
}
|
|
380
|
+
async exists(transport, location, _context) {
|
|
381
|
+
return transport.exists(location);
|
|
382
|
+
}
|
|
339
383
|
async delete(transport, location, _context) {
|
|
340
|
-
|
|
341
|
-
|
|
384
|
+
try {
|
|
385
|
+
await transport.delete(location);
|
|
386
|
+
} catch (error) {
|
|
387
|
+
throw new SemanticError(`Failed to delete "${location}": ${error.message}`, this.name, { cause: error });
|
|
342
388
|
}
|
|
343
|
-
await transport.delete(location);
|
|
344
389
|
}
|
|
345
390
|
}
|
|
346
391
|
var binarySemantic = new BinarySemanticHandler;
|
|
@@ -424,7 +469,7 @@ class ARP {
|
|
|
424
469
|
function createARP(config) {
|
|
425
470
|
return new ARP(config);
|
|
426
471
|
}
|
|
427
|
-
var VERSION = "1.
|
|
472
|
+
var VERSION = "1.2.0";
|
|
428
473
|
export {
|
|
429
474
|
textSemantic,
|
|
430
475
|
httpsTransport,
|
|
@@ -444,4 +489,4 @@ export {
|
|
|
444
489
|
ARP
|
|
445
490
|
};
|
|
446
491
|
|
|
447
|
-
//# debugId=
|
|
492
|
+
//# debugId=46B749C94F83453A64756E2164756E21
|
package/dist/arp.js.map
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../arp/dist/index.js"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"// src/errors.ts\nclass ARPError extends Error {\n constructor(message, options) {\n super(message, options);\n this.name = \"ARPError\";\n }\n}\n\nclass ParseError extends ARPError {\n url;\n constructor(message, url) {\n super(message);\n this.url = url;\n this.name = \"ParseError\";\n }\n}\n\nclass TransportError extends ARPError {\n transport;\n constructor(message, transport, options) {\n super(message, options);\n this.transport = transport;\n this.name = \"TransportError\";\n }\n}\n\nclass SemanticError extends ARPError {\n semantic;\n constructor(message, semantic, options) {\n super(message, options);\n this.semantic = semantic;\n this.name = \"SemanticError\";\n }\n}\n\n// src/ARL.ts\nclass ARL {\n semantic;\n transport;\n location;\n resolver;\n constructor(semantic, transport, location, resolver) {\n this.semantic = semantic;\n this.transport = transport;\n this.location = location;\n this.resolver = resolver;\n }\n createContext() {\n return {\n url: this.toString(),\n semantic: this.semantic,\n transport: this.transport,\n location: this.location,\n timestamp: new Date\n };\n }\n async resolve() {\n const transport = this.resolver.getTransportHandler(this.transport);\n const semantic = this.resolver.getSemanticHandler(this.semantic);\n const context = this.createContext();\n return semantic.resolve(transport, this.location, context);\n }\n async deposit(data) {\n const transport = this.resolver.getTransportHandler(this.transport);\n const semantic = this.resolver.getSemanticHandler(this.semantic);\n const context = this.createContext();\n if (!semantic.deposit) {\n throw new SemanticError(`Semantic \"${semantic.name}\" does not support deposit operation`, this.semantic);\n }\n await semantic.deposit(transport, this.location, data, context);\n }\n async exists() {\n const transport = this.resolver.getTransportHandler(this.transport);\n const semantic = this.resolver.getSemanticHandler(this.semantic);\n const context = this.createContext();\n if (semantic.exists) {\n return semantic.exists(transport, this.location, context);\n }\n if (transport.exists) {\n return transport.exists(this.location);\n }\n try {\n await transport.read(this.location);\n return true;\n } catch {\n return false;\n }\n }\n async delete() {\n const transport = this.resolver.getTransportHandler(this.transport);\n const semantic = this.resolver.getSemanticHandler(this.semantic);\n const context = this.createContext();\n if (semantic.delete) {\n return semantic.delete(transport, this.location, context);\n }\n if (!transport.delete) {\n throw new SemanticError(`Neither semantic \"${semantic.name}\" nor transport \"${transport.name}\" supports delete operation`, this.semantic);\n }\n await transport.delete(this.location);\n }\n toString() {\n return `arp:${this.semantic}:${this.transport}://${this.location}`;\n }\n}\n\n// src/transport/file.ts\nimport { readFile, writeFile, readdir, mkdir, rm, access, stat as fsStat } from \"node:fs/promises\";\nimport { resolve, dirname } from \"node:path\";\nclass FileTransportHandler {\n name = \"file\";\n capabilities = {\n canRead: true,\n canWrite: true,\n canList: true,\n canDelete: true,\n canStat: true\n };\n resolvePath(location) {\n return resolve(process.cwd(), location);\n }\n async read(location) {\n const filePath = this.resolvePath(location);\n try {\n return await readFile(filePath);\n } catch (error) {\n const err = error;\n throw new TransportError(`File read error: ${err.code} - ${filePath}`, this.name, {\n cause: err\n });\n }\n }\n async write(location, content) {\n const filePath = this.resolvePath(location);\n try {\n await mkdir(dirname(filePath), { recursive: true });\n await writeFile(filePath, content);\n } catch (error) {\n const err = error;\n throw new TransportError(`File write error: ${err.code} - ${filePath}`, this.name, {\n cause: err\n });\n }\n }\n async list(location) {\n const dirPath = this.resolvePath(location);\n try {\n return await readdir(dirPath);\n } catch (error) {\n const err = error;\n throw new TransportError(`Directory list error: ${err.code} - ${dirPath}`, this.name, {\n cause: err\n });\n }\n }\n async mkdir(location) {\n const dirPath = this.resolvePath(location);\n try {\n await mkdir(dirPath, { recursive: true });\n } catch (error) {\n const err = error;\n throw new TransportError(`Directory create error: ${err.code} - ${dirPath}`, this.name, {\n cause: err\n });\n }\n }\n async exists(location) {\n const filePath = this.resolvePath(location);\n try {\n await access(filePath);\n return true;\n } catch {\n return false;\n }\n }\n async stat(location) {\n const filePath = this.resolvePath(location);\n try {\n const stats = await fsStat(filePath);\n return {\n size: stats.size,\n modifiedAt: stats.mtime,\n isDirectory: stats.isDirectory()\n };\n } catch (error) {\n const err = error;\n throw new TransportError(`File stat error: ${err.code} - ${filePath}`, this.name, {\n cause: err\n });\n }\n }\n async delete(location) {\n const filePath = this.resolvePath(location);\n try {\n await rm(filePath, { recursive: true });\n } catch (error) {\n const err = error;\n throw new TransportError(`File delete error: ${err.code} - ${filePath}`, this.name, {\n cause: err\n });\n }\n }\n}\nvar fileTransport = new FileTransportHandler;\n// src/transport/http.ts\nclass HttpTransportHandler {\n name;\n protocol;\n capabilities = {\n canRead: true,\n canWrite: false,\n canList: false,\n canDelete: false,\n canStat: false\n };\n constructor(protocol = \"https\") {\n this.protocol = protocol;\n this.name = protocol;\n }\n async read(location) {\n const url = `${this.protocol}://${location}`;\n try {\n const response = await fetch(url);\n if (!response.ok) {\n throw new TransportError(`HTTP ${response.status}: ${response.statusText} - ${url}`, this.name);\n }\n const arrayBuffer = await response.arrayBuffer();\n return Buffer.from(arrayBuffer);\n } catch (error) {\n if (error instanceof TransportError) {\n throw error;\n }\n throw new TransportError(`Network error: ${url}`, this.name, {\n cause: error\n });\n }\n }\n}\nvar httpsTransport = new HttpTransportHandler(\"https\");\nvar httpTransport = new HttpTransportHandler(\"http\");\n// src/semantic/text.ts\nclass TextSemanticHandler {\n name = \"text\";\n async resolve(transport, location, context) {\n const buffer = await transport.read(location);\n const text = buffer.toString(\"utf-8\");\n const meta = {\n url: context.url,\n semantic: context.semantic,\n transport: context.transport,\n location: context.location,\n size: buffer.length,\n encoding: \"utf-8\",\n mimeType: \"text/plain\",\n resolvedAt: context.timestamp.toISOString()\n };\n return {\n type: \"text\",\n content: text,\n meta\n };\n }\n async deposit(transport, location, data, _context) {\n if (!transport.write) {\n throw new SemanticError(`Transport \"${transport.name}\" does not support write operation`, this.name);\n }\n const buffer = Buffer.from(data, \"utf-8\");\n await transport.write(location, buffer);\n }\n async exists(transport, location, _context) {\n if (transport.exists) {\n return transport.exists(location);\n }\n try {\n await transport.read(location);\n return true;\n } catch {\n return false;\n }\n }\n async delete(transport, location, _context) {\n if (!transport.delete) {\n throw new SemanticError(`Transport \"${transport.name}\" does not support delete operation`, this.name);\n }\n await transport.delete(location);\n }\n}\nvar textSemantic = new TextSemanticHandler;\n// src/semantic/binary.ts\nfunction toBuffer(data) {\n if (Buffer.isBuffer(data)) {\n return data;\n }\n if (data instanceof Uint8Array) {\n return Buffer.from(data);\n }\n if (data instanceof ArrayBuffer) {\n return Buffer.from(data);\n }\n if (Array.isArray(data)) {\n return Buffer.from(data);\n }\n throw new SemanticError(`Unsupported binary input type`, \"binary\");\n}\n\nclass BinarySemanticHandler {\n name = \"binary\";\n async resolve(transport, location, context) {\n const buffer = await transport.read(location);\n const meta = {\n url: context.url,\n semantic: context.semantic,\n transport: context.transport,\n location: context.location,\n size: buffer.length,\n resolvedAt: context.timestamp.toISOString()\n };\n return {\n type: \"binary\",\n content: buffer,\n meta\n };\n }\n async deposit(transport, location, data, _context) {\n if (!transport.write) {\n throw new SemanticError(`Transport \"${transport.name}\" does not support write operation`, this.name);\n }\n const buffer = toBuffer(data);\n await transport.write(location, buffer);\n }\n async exists(transport, location, _context) {\n if (transport.exists) {\n return transport.exists(location);\n }\n try {\n await transport.read(location);\n return true;\n } catch {\n return false;\n }\n }\n async delete(transport, location, _context) {\n if (!transport.delete) {\n throw new SemanticError(`Transport \"${transport.name}\" does not support delete operation`, this.name);\n }\n await transport.delete(location);\n }\n}\nvar binarySemantic = new BinarySemanticHandler;\n// src/ARP.ts\nclass ARP {\n transports;\n semantics;\n constructor(config = {}) {\n this.transports = new Map;\n this.semantics = new Map;\n const defaultTransports = [fileTransport, httpTransport, httpsTransport];\n const defaultSemantics = [textSemantic, binarySemantic];\n for (const handler of defaultTransports) {\n this.transports.set(handler.name, handler);\n }\n for (const handler of defaultSemantics) {\n this.semantics.set(handler.name, handler);\n }\n if (config.transports) {\n for (const handler of config.transports) {\n this.transports.set(handler.name, handler);\n }\n }\n if (config.semantics) {\n for (const handler of config.semantics) {\n this.semantics.set(handler.name, handler);\n }\n }\n }\n registerTransport(handler) {\n this.transports.set(handler.name, handler);\n }\n registerSemantic(handler) {\n this.semantics.set(handler.name, handler);\n }\n getTransportHandler(name) {\n const handler = this.transports.get(name);\n if (!handler) {\n throw new TransportError(`Unsupported transport type: ${name}`, name);\n }\n return handler;\n }\n getSemanticHandler(name) {\n const handler = this.semantics.get(name);\n if (!handler) {\n throw new SemanticError(`Unsupported semantic type: ${name}`, name);\n }\n return handler;\n }\n parse(url) {\n if (!url.startsWith(\"arp:\")) {\n throw new ParseError(`Invalid ARP URL: must start with \"arp:\"`, url);\n }\n const content = url.substring(4);\n const separatorIndex = content.indexOf(\"://\");\n if (separatorIndex === -1) {\n throw new ParseError(`Invalid ARP URL: missing \"://\"`, url);\n }\n const typePart = content.substring(0, separatorIndex);\n const location = content.substring(separatorIndex + 3);\n const colonIndex = typePart.indexOf(\":\");\n if (colonIndex === -1) {\n throw new ParseError(`Invalid ARP URL: must have exactly 2 types (semantic:transport)`, url);\n }\n const semantic = typePart.substring(0, colonIndex);\n const transport = typePart.substring(colonIndex + 1);\n if (!semantic) {\n throw new ParseError(`Invalid ARP URL: semantic type cannot be empty`, url);\n }\n if (!transport) {\n throw new ParseError(`Invalid ARP URL: transport type cannot be empty`, url);\n }\n if (!location) {\n throw new ParseError(`Invalid ARP URL: location cannot be empty`, url);\n }\n this.getTransportHandler(transport);\n this.getSemanticHandler(semantic);\n return new ARL(semantic, transport, location, this);\n }\n}\nfunction createARP(config) {\n return new ARP(config);\n}\n\n// src/index.ts\nvar VERSION = \"1.0.0\";\nexport {\n textSemantic,\n httpsTransport,\n httpTransport,\n fileTransport,\n createARP,\n binarySemantic,\n VERSION,\n TransportError,\n TextSemanticHandler,\n SemanticError,\n ParseError,\n HttpTransportHandler,\n FileTransportHandler,\n BinarySemanticHandler,\n ARPError,\n ARP\n};\n\n//# debugId=897CAF2B3335A7ED64756E2164756E21\n"
|
|
5
|
+
"// src/errors.ts\nclass ARPError extends Error {\n constructor(message, options) {\n super(message, options);\n this.name = \"ARPError\";\n }\n}\n\nclass ParseError extends ARPError {\n url;\n constructor(message, url) {\n super(message);\n this.url = url;\n this.name = \"ParseError\";\n }\n}\n\nclass TransportError extends ARPError {\n transport;\n constructor(message, transport, options) {\n super(message, options);\n this.transport = transport;\n this.name = \"TransportError\";\n }\n}\n\nclass SemanticError extends ARPError {\n semantic;\n constructor(message, semantic, options) {\n super(message, options);\n this.semantic = semantic;\n this.name = \"SemanticError\";\n }\n}\n\n// src/ARL.ts\nclass ARL {\n semantic;\n transport;\n location;\n resolver;\n constructor(semantic, transport, location, resolver) {\n this.semantic = semantic;\n this.transport = transport;\n this.location = location;\n this.resolver = resolver;\n }\n createContext(params) {\n return {\n url: this.toString(),\n semantic: this.semantic,\n transport: this.transport,\n location: this.location,\n timestamp: new Date,\n params\n };\n }\n async resolve(params) {\n const transport = this.resolver.getTransportHandler(this.transport);\n const semantic = this.resolver.getSemanticHandler(this.semantic);\n const context = this.createContext(params);\n return semantic.resolve(transport, this.location, context);\n }\n async deposit(data, params) {\n const transport = this.resolver.getTransportHandler(this.transport);\n const semantic = this.resolver.getSemanticHandler(this.semantic);\n const context = this.createContext(params);\n if (!semantic.deposit) {\n throw new SemanticError(`Semantic \"${semantic.name}\" does not support deposit operation`, this.semantic);\n }\n await semantic.deposit(transport, this.location, data, context);\n }\n async exists() {\n const transport = this.resolver.getTransportHandler(this.transport);\n const semantic = this.resolver.getSemanticHandler(this.semantic);\n const context = this.createContext();\n if (semantic.exists) {\n return semantic.exists(transport, this.location, context);\n }\n return transport.exists(this.location);\n }\n async delete() {\n const transport = this.resolver.getTransportHandler(this.transport);\n const semantic = this.resolver.getSemanticHandler(this.semantic);\n const context = this.createContext();\n if (semantic.delete) {\n return semantic.delete(transport, this.location, context);\n }\n await transport.delete(this.location);\n }\n toString() {\n return `arp:${this.semantic}:${this.transport}://${this.location}`;\n }\n}\n\n// src/transport/file.ts\nimport { readFile, writeFile, readdir, mkdir, rm, access, stat } from \"node:fs/promises\";\nimport { resolve, dirname, join } from \"node:path\";\nclass FileTransportHandler {\n name = \"file\";\n resolvePath(location) {\n return resolve(process.cwd(), location);\n }\n async get(location, params) {\n const filePath = this.resolvePath(location);\n try {\n const stats = await stat(filePath);\n if (stats.isDirectory()) {\n return this.getDirectory(filePath, stats, params);\n } else {\n return this.getFile(filePath, stats);\n }\n } catch (error) {\n const err = error;\n throw new TransportError(`File get error: ${err.code} - ${filePath}`, this.name, {\n cause: err\n });\n }\n }\n async getFile(filePath, stats) {\n const content = await readFile(filePath);\n return {\n content,\n metadata: {\n type: \"file\",\n size: Number(stats.size),\n modifiedAt: stats.mtime\n }\n };\n }\n async getDirectory(dirPath, stats, params) {\n const recursive = params?.recursive === \"true\";\n const pattern = params?.pattern;\n let entries;\n if (recursive) {\n entries = await this.listRecursive(dirPath, dirPath);\n } else {\n entries = await readdir(dirPath);\n }\n if (pattern) {\n entries = this.filterByPattern(entries, pattern);\n }\n const content = Buffer.from(JSON.stringify(entries));\n return {\n content,\n metadata: {\n type: \"directory\",\n modifiedAt: stats.mtime\n }\n };\n }\n async listRecursive(basePath, currentPath) {\n const entries = await readdir(currentPath, { withFileTypes: true });\n const results = [];\n for (const entry of entries) {\n const fullPath = join(currentPath, entry.name);\n const relativePath = fullPath.substring(basePath.length + 1);\n if (entry.isDirectory()) {\n const subEntries = await this.listRecursive(basePath, fullPath);\n results.push(...subEntries);\n } else {\n results.push(relativePath);\n }\n }\n return results;\n }\n filterByPattern(entries, pattern) {\n const regexPattern = pattern.replace(/\\./g, \"\\\\.\").replace(/\\*/g, \".*\").replace(/\\?/g, \".\");\n const regex = new RegExp(`^${regexPattern}$`);\n return entries.filter((entry) => {\n const filename = entry.split(\"/\").pop() || entry;\n return regex.test(filename);\n });\n }\n async set(location, content, _params) {\n const filePath = this.resolvePath(location);\n try {\n await mkdir(dirname(filePath), { recursive: true });\n await writeFile(filePath, content);\n } catch (error) {\n const err = error;\n throw new TransportError(`File set error: ${err.code} - ${filePath}`, this.name, {\n cause: err\n });\n }\n }\n async exists(location) {\n const filePath = this.resolvePath(location);\n try {\n await access(filePath);\n return true;\n } catch {\n return false;\n }\n }\n async delete(location) {\n const filePath = this.resolvePath(location);\n try {\n await rm(filePath, { recursive: true });\n } catch (error) {\n const err = error;\n if (err.code === \"ENOENT\") {\n return;\n }\n throw new TransportError(`File delete error: ${err.code} - ${filePath}`, this.name, {\n cause: err\n });\n }\n }\n}\nvar fileTransport = new FileTransportHandler;\n// src/transport/http.ts\nclass HttpTransportHandler {\n name;\n protocol;\n constructor(protocol = \"https\") {\n this.protocol = protocol;\n this.name = protocol;\n }\n async get(location, params) {\n const url = this.buildUrl(location, params);\n try {\n const response = await fetch(url);\n if (!response.ok) {\n throw new TransportError(`HTTP ${response.status}: ${response.statusText} - ${url}`, this.name);\n }\n const arrayBuffer = await response.arrayBuffer();\n const content = Buffer.from(arrayBuffer);\n const contentType = response.headers.get(\"content-type\");\n const contentLength = response.headers.get(\"content-length\");\n const lastModified = response.headers.get(\"last-modified\");\n return {\n content,\n metadata: {\n type: \"file\",\n size: contentLength ? parseInt(contentLength, 10) : content.length,\n modifiedAt: lastModified ? new Date(lastModified) : undefined,\n contentType\n }\n };\n } catch (error) {\n if (error instanceof TransportError) {\n throw error;\n }\n throw new TransportError(`Network error: ${url}`, this.name, {\n cause: error\n });\n }\n }\n buildUrl(location, params) {\n const url = new URL(`${this.protocol}://${location}`);\n if (params) {\n for (const [key, value] of Object.entries(params)) {\n url.searchParams.set(key, value);\n }\n }\n return url.toString();\n }\n async set(_location, _content, _params) {\n throw new TransportError(\"HTTP transport is read-only, set not supported\", this.name);\n }\n async exists(location) {\n const url = `${this.protocol}://${location}`;\n try {\n const response = await fetch(url, { method: \"HEAD\" });\n return response.ok;\n } catch {\n return false;\n }\n }\n async delete(_location) {\n throw new TransportError(\"HTTP transport is read-only, delete not supported\", this.name);\n }\n}\nvar httpsTransport = new HttpTransportHandler(\"https\");\nvar httpTransport = new HttpTransportHandler(\"http\");\n// src/semantic/text.ts\nclass TextSemanticHandler {\n name = \"text\";\n async resolve(transport, location, context) {\n const result = await transport.get(location, context.params);\n if (result.metadata?.type === \"directory\") {\n const meta2 = {\n url: context.url,\n semantic: context.semantic,\n transport: context.transport,\n location: context.location,\n size: result.content.length,\n encoding: \"utf-8\",\n mimeType: \"application/json\",\n resolvedAt: context.timestamp.toISOString(),\n type: \"directory\"\n };\n return {\n type: \"text\",\n content: result.content.toString(\"utf-8\"),\n meta: meta2\n };\n }\n const text = result.content.toString(\"utf-8\");\n const meta = {\n url: context.url,\n semantic: context.semantic,\n transport: context.transport,\n location: context.location,\n size: result.metadata?.size ?? result.content.length,\n encoding: \"utf-8\",\n mimeType: \"text/plain\",\n resolvedAt: context.timestamp.toISOString(),\n type: \"file\"\n };\n return {\n type: \"text\",\n content: text,\n meta\n };\n }\n async deposit(transport, location, data, context) {\n const buffer = Buffer.from(data, \"utf-8\");\n try {\n await transport.set(location, buffer, context.params);\n } catch (error) {\n throw new SemanticError(`Failed to deposit text to \"${location}\": ${error.message}`, this.name, { cause: error });\n }\n }\n async exists(transport, location, _context) {\n return transport.exists(location);\n }\n async delete(transport, location, _context) {\n try {\n await transport.delete(location);\n } catch (error) {\n throw new SemanticError(`Failed to delete \"${location}\": ${error.message}`, this.name, { cause: error });\n }\n }\n}\nvar textSemantic = new TextSemanticHandler;\n// src/semantic/binary.ts\nfunction toBuffer(data) {\n if (Buffer.isBuffer(data)) {\n return data;\n }\n if (data instanceof Uint8Array) {\n return Buffer.from(data);\n }\n if (data instanceof ArrayBuffer) {\n return Buffer.from(data);\n }\n if (Array.isArray(data)) {\n return Buffer.from(data);\n }\n throw new SemanticError(`Unsupported binary input type`, \"binary\");\n}\n\nclass BinarySemanticHandler {\n name = \"binary\";\n async resolve(transport, location, context) {\n const result = await transport.get(location, context.params);\n const meta = {\n url: context.url,\n semantic: context.semantic,\n transport: context.transport,\n location: context.location,\n size: result.metadata?.size ?? result.content.length,\n resolvedAt: context.timestamp.toISOString(),\n type: result.metadata?.type\n };\n return {\n type: \"binary\",\n content: result.content,\n meta\n };\n }\n async deposit(transport, location, data, context) {\n const buffer = toBuffer(data);\n try {\n await transport.set(location, buffer, context.params);\n } catch (error) {\n throw new SemanticError(`Failed to deposit binary to \"${location}\": ${error.message}`, this.name, { cause: error });\n }\n }\n async exists(transport, location, _context) {\n return transport.exists(location);\n }\n async delete(transport, location, _context) {\n try {\n await transport.delete(location);\n } catch (error) {\n throw new SemanticError(`Failed to delete \"${location}\": ${error.message}`, this.name, { cause: error });\n }\n }\n}\nvar binarySemantic = new BinarySemanticHandler;\n// src/ARP.ts\nclass ARP {\n transports;\n semantics;\n constructor(config = {}) {\n this.transports = new Map;\n this.semantics = new Map;\n const defaultTransports = [fileTransport, httpTransport, httpsTransport];\n const defaultSemantics = [textSemantic, binarySemantic];\n for (const handler of defaultTransports) {\n this.transports.set(handler.name, handler);\n }\n for (const handler of defaultSemantics) {\n this.semantics.set(handler.name, handler);\n }\n if (config.transports) {\n for (const handler of config.transports) {\n this.transports.set(handler.name, handler);\n }\n }\n if (config.semantics) {\n for (const handler of config.semantics) {\n this.semantics.set(handler.name, handler);\n }\n }\n }\n registerTransport(handler) {\n this.transports.set(handler.name, handler);\n }\n registerSemantic(handler) {\n this.semantics.set(handler.name, handler);\n }\n getTransportHandler(name) {\n const handler = this.transports.get(name);\n if (!handler) {\n throw new TransportError(`Unsupported transport type: ${name}`, name);\n }\n return handler;\n }\n getSemanticHandler(name) {\n const handler = this.semantics.get(name);\n if (!handler) {\n throw new SemanticError(`Unsupported semantic type: ${name}`, name);\n }\n return handler;\n }\n parse(url) {\n if (!url.startsWith(\"arp:\")) {\n throw new ParseError(`Invalid ARP URL: must start with \"arp:\"`, url);\n }\n const content = url.substring(4);\n const separatorIndex = content.indexOf(\"://\");\n if (separatorIndex === -1) {\n throw new ParseError(`Invalid ARP URL: missing \"://\"`, url);\n }\n const typePart = content.substring(0, separatorIndex);\n const location = content.substring(separatorIndex + 3);\n const colonIndex = typePart.indexOf(\":\");\n if (colonIndex === -1) {\n throw new ParseError(`Invalid ARP URL: must have exactly 2 types (semantic:transport)`, url);\n }\n const semantic = typePart.substring(0, colonIndex);\n const transport = typePart.substring(colonIndex + 1);\n if (!semantic) {\n throw new ParseError(`Invalid ARP URL: semantic type cannot be empty`, url);\n }\n if (!transport) {\n throw new ParseError(`Invalid ARP URL: transport type cannot be empty`, url);\n }\n if (!location) {\n throw new ParseError(`Invalid ARP URL: location cannot be empty`, url);\n }\n this.getTransportHandler(transport);\n this.getSemanticHandler(semantic);\n return new ARL(semantic, transport, location, this);\n }\n}\nfunction createARP(config) {\n return new ARP(config);\n}\n\n// src/index.ts\nvar VERSION = \"1.2.0\";\nexport {\n textSemantic,\n httpsTransport,\n httpTransport,\n fileTransport,\n createARP,\n binarySemantic,\n VERSION,\n TransportError,\n TextSemanticHandler,\n SemanticError,\n ParseError,\n HttpTransportHandler,\n FileTransportHandler,\n BinarySemanticHandler,\n ARPError,\n ARP\n};\n\n//# debugId=A246D95FD0E42A2864756E2164756E21\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": ";AA0GA,kEAA0D;AAC1D;AAAA;AA1GA,MAAM,iBAAiB,MAAM;AAAA,EAC3B,WAAW,CAAC,SAAS,SAAS;AAAA,IAC5B,MAAM,SAAS,OAAO;AAAA,IACtB,KAAK,OAAO;AAAA;AAEhB;AAAA;AAEA,MAAM,mBAAmB,SAAS;AAAA,EAChC;AAAA,EACA,WAAW,CAAC,SAAS,KAAK;AAAA,IACxB,MAAM,OAAO;AAAA,IACb,KAAK,MAAM;AAAA,IACX,KAAK,OAAO;AAAA;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kD,GAAG;AAAA,IAC5E;AAAA,IACA,IAAI,CAAC,WAAW;AAAA,MACd,MAAM,IAAI,WAAW,mDAAmD,GAAG;AAAA,IAC7E;AAAA,IACA,IAAI,CAAC,UAAU;AAAA,MACb,MAAM,IAAI,WAAW,6CAA6C,GAAG;AAAA,IACvE;AAAA,IACA,KAAK,oBAAoB,SAAS;AAAA,IAClC,KAAK,mBAAmB,QAAQ;AAAA,IAChC,OAAO,IAAI,IAAI,UAAU,WAAW,UAAU,IAAI;AAAA;AAEtD;AACA,SAAS,SAAS,CAAC,QAAQ;AAAA,EACzB,OAAO,IAAI,IAAI,MAAM;AAAA;AAIvB,IAAI,UAAU;",
|
|
8
|
+
"debugId": "46B749C94F83453A64756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import { RXL } from "@resourcexjs/core";
|
|
|
5
5
|
import { parseRXL } from "@resourcexjs/core";
|
|
6
6
|
import { RXM, ManifestData } from "@resourcexjs/core";
|
|
7
7
|
import { createRXM } from "@resourcexjs/core";
|
|
8
|
-
import { RXC } from "@resourcexjs/core";
|
|
9
|
-
import { createRXC
|
|
8
|
+
import { RXC, RXCInput } from "@resourcexjs/core";
|
|
9
|
+
import { createRXC } from "@resourcexjs/core";
|
|
10
10
|
import { RXR } from "@resourcexjs/core";
|
|
11
11
|
import { ResourceType, ResourceSerializer, ResourceResolver } from "@resourcexjs/type";
|
|
12
12
|
import { textType, jsonType, binaryType, builtinTypes } from "@resourcexjs/type";
|
|
@@ -17,4 +17,4 @@ import { LoadResourceConfig } from "@resourcexjs/loader";
|
|
|
17
17
|
import { Registry, RegistryConfig } from "@resourcexjs/registry";
|
|
18
18
|
import { createRegistry, ARPRegistry } from "@resourcexjs/registry";
|
|
19
19
|
declare const VERSION: string;
|
|
20
|
-
export { textType, parseRXL, loadResource,
|
|
20
|
+
export { textType, parseRXL, loadResource, jsonType, globalTypeHandlerChain, createRegistry, createRXM, createRXC, builtinTypes, binaryType, VERSION, TypeHandlerChain, ResourceXError, ResourceTypeError, ResourceType, ResourceSerializer, ResourceResolver, ResourceLoader, RegistryError, RegistryConfig, Registry, RXR, RXM, RXL, RXCInput, RXC, ManifestError, ManifestData, LocatorError, LoadResourceConfig, FolderLoader, ContentError, ARPRegistry };
|