@peers-app/peers-sdk 0.10.4 → 0.11.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/data/packages.d.ts
CHANGED
|
@@ -79,7 +79,7 @@ export declare class PackagesTable extends Table<IPackage> {
|
|
|
79
79
|
delete(packageId: string): Promise<void>;
|
|
80
80
|
}
|
|
81
81
|
export declare function Packages(dataContext?: DataContext): PackagesTable;
|
|
82
|
-
export declare const packagesRootDir
|
|
82
|
+
export declare const packagesRootDir = "~/peers/packages";
|
|
83
83
|
export declare const reloadPackagesOnPageRefresh: import("./persistent-vars").PersistentVar<boolean>;
|
|
84
84
|
export declare const autoUpdatePeersCore: import("./persistent-vars").PersistentVar<boolean>;
|
|
85
85
|
export {};
|
package/dist/data/packages.js
CHANGED
|
@@ -133,6 +133,6 @@ exports.PackagesTable = PackagesTable;
|
|
|
133
133
|
function Packages(dataContext) {
|
|
134
134
|
return (0, context_1.getTableContainer)(dataContext).getTable(metaData, schema, PackagesTable);
|
|
135
135
|
}
|
|
136
|
-
exports.packagesRootDir =
|
|
136
|
+
exports.packagesRootDir = '~/peers/packages';
|
|
137
137
|
exports.reloadPackagesOnPageRefresh = (0, persistent_vars_1.deviceVar)('reloadPackagesOnPageRefresh', { defaultValue: true, });
|
|
138
138
|
exports.autoUpdatePeersCore = (0, persistent_vars_1.deviceVar)('autoUpdatePeersCore', { defaultValue: true });
|
|
@@ -108,6 +108,10 @@ class PackageLoader {
|
|
|
108
108
|
case 'zod':
|
|
109
109
|
return PackageLoader.Zod || _require('zod');
|
|
110
110
|
default:
|
|
111
|
+
// TODO: Add a permissions system for packages — packages should declare which
|
|
112
|
+
// external Node modules they need (e.g. child_process, os, path), and the loader
|
|
113
|
+
// should verify they are allowed before granting access. For now we pass through
|
|
114
|
+
// to the underlying require and log a warning so usages remain visible.
|
|
111
115
|
console.warn(`Package ${pkg.name} is requiring a module ${moduleId}, which is not provided by the package loader.`);
|
|
112
116
|
return _require(moduleId);
|
|
113
117
|
}
|