@resourcexjs/core 2.17.1 → 2.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +13 -2
- package/dist/index.js +3 -2
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1079,8 +1079,19 @@ declare class MemoryRXMStore implements RXMStore {
|
|
|
1079
1079
|
* - "srt": OS-level isolation (~50ms), secure local dev
|
|
1080
1080
|
* - "cloudflare": Container isolation (~100ms), local Docker or edge
|
|
1081
1081
|
* - "e2b": MicroVM isolation (~150ms), production (planned)
|
|
1082
|
+
* - "custom": User-provided executor function
|
|
1082
1083
|
*/
|
|
1083
|
-
type IsolatorType = "none" | "srt" | "cloudflare" | "e2b";
|
|
1084
|
+
type IsolatorType = "none" | "srt" | "cloudflare" | "e2b" | "custom";
|
|
1085
|
+
/**
|
|
1086
|
+
* Custom executor function for resolver execution.
|
|
1087
|
+
* Used when isolator is set to "custom".
|
|
1088
|
+
*
|
|
1089
|
+
* @param code - Bundled resolver code string
|
|
1090
|
+
* @param context - Pre-processed resolve context (manifest + files)
|
|
1091
|
+
* @param args - Optional arguments for the resolver
|
|
1092
|
+
* @returns Resolver result
|
|
1093
|
+
*/
|
|
1094
|
+
type CustomExecutor = <TResult>(code: string, context: ResolveContext, args?: unknown) => Promise<TResult>;
|
|
1084
1095
|
/**
|
|
1085
1096
|
* ResolveContext - Pure data context passed to resolver in sandbox.
|
|
1086
1097
|
*
|
|
@@ -1312,4 +1323,4 @@ declare class TypeHandlerChain {
|
|
|
1312
1323
|
*/
|
|
1313
1324
|
clear(): void;
|
|
1314
1325
|
}
|
|
1315
|
-
export { wrap, withDomainValidation, textType, skillType, resource, resolveSource, prototypeType, parse, manifest, locate, loadResource, jsonType, isValidDigest, generateDefinition, format, extract, discoverRegistry, define, computeDigest, bundleResourceType, builtinTypes, binaryType, archive, WellKnownResponse, TypeHandlerChain, TypeDetectorChain, TypeDetector, TypeDetectionResult, StoredRXM, SourceLoaderChain, SourceLoader, SkillDetector, SearchOptions, ResourceXProvider, ResourceXError, ResourceTypeError, ResourceType, ResourceResolver, ResourceLoader, ResourceJsonDetector, ResolvedResource, ResolveSourceConfig, ResolveContext, RegistryMiddleware, RegistryError, RegistryEntry, Registry, RXS, RXR, RXMStore, RXMSource, RXMSearchOptions, RXMDefinition, RXMArchive, RXM, RXL, RXI, RXD, RXAStore, RXA, ProviderStores, ProviderDefaults, ProviderConfig, PrototypeDetector, MemoryRXMStore, MemoryRXAStore, ManifestError, LocatorError, LoadResourceConfig, LinkedRegistry, JSONSchemaProperty, JSONSchema, IsolatorType, GitHubSourceLoader, FolderSourceLoader, FolderLoader, FileTree, FileEntry, DomainValidation, DiscoveryResult, DefinitionError, ContentError, CASRegistry, BundledType };
|
|
1326
|
+
export { wrap, withDomainValidation, textType, skillType, resource, resolveSource, prototypeType, parse, manifest, locate, loadResource, jsonType, isValidDigest, generateDefinition, format, extract, discoverRegistry, define, computeDigest, bundleResourceType, builtinTypes, binaryType, archive, WellKnownResponse, TypeHandlerChain, TypeDetectorChain, TypeDetector, TypeDetectionResult, StoredRXM, SourceLoaderChain, SourceLoader, SkillDetector, SearchOptions, ResourceXProvider, ResourceXError, ResourceTypeError, ResourceType, ResourceResolver, ResourceLoader, ResourceJsonDetector, ResolvedResource, ResolveSourceConfig, ResolveContext, RegistryMiddleware, RegistryError, RegistryEntry, Registry, RXS, RXR, RXMStore, RXMSource, RXMSearchOptions, RXMDefinition, RXMArchive, RXM, RXL, RXI, RXD, RXAStore, RXA, ProviderStores, ProviderDefaults, ProviderConfig, PrototypeDetector, MemoryRXMStore, MemoryRXAStore, ManifestError, LocatorError, LoadResourceConfig, LinkedRegistry, JSONSchemaProperty, JSONSchema, IsolatorType, GitHubSourceLoader, FolderSourceLoader, FolderLoader, FileTree, FileEntry, DomainValidation, DiscoveryResult, DefinitionError, CustomExecutor, ContentError, CASRegistry, BundledType };
|
package/dist/index.js
CHANGED
|
@@ -15160,7 +15160,8 @@ class NpmSourceLoader {
|
|
|
15160
15160
|
return { source, files: rxs.files };
|
|
15161
15161
|
}
|
|
15162
15162
|
resolvePackageDir(packageName) {
|
|
15163
|
-
const
|
|
15163
|
+
const entry = globalThis.Bun?.main ?? process.argv[1] ?? join3(process.cwd(), "noop.js");
|
|
15164
|
+
const parent = pathToFileURL(entry).href;
|
|
15164
15165
|
try {
|
|
15165
15166
|
const url2 = import.meta.resolve(`${packageName}/package.json`, parent);
|
|
15166
15167
|
return dirname(fileURLToPath(url2));
|
|
@@ -15997,4 +15998,4 @@ export {
|
|
|
15997
15998
|
CASRegistry
|
|
15998
15999
|
};
|
|
15999
16000
|
|
|
16000
|
-
//# debugId=
|
|
16001
|
+
//# debugId=124BD7881166D2C664756E2164756E21
|