ozmoz 0.1.41 → 0.1.44
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/cli.cjs +52 -51
- package/dist/index.js +1 -1
- package/dist/ozmoz.iife.js +1 -1
- package/index.d.ts +6 -0
- package/package.json +1 -1
- package/scripts/setup-lib.cjs +1 -1
package/index.d.ts
CHANGED
|
@@ -75,6 +75,12 @@ export interface OzClient extends OzTagNames {
|
|
|
75
75
|
getDocsG: <T = any>(table: string, options?: any) => Promise<T[]>;
|
|
76
76
|
getDocsU: <T = any>(table: string, options?: any) => Promise<T[]>;
|
|
77
77
|
getDoc: <T = any>(table: string, docId: string, options?: any) => Promise<T | null>;
|
|
78
|
+
|
|
79
|
+
// Live data (read-only). Reloads when the data changes elsewhere. Returns a function that stops it.
|
|
80
|
+
watch: {
|
|
81
|
+
<T = any>(table: string, options: { desc?: string; role?: string; guard?: string; scope?: 'all' | 'user'; where?: Record<string, string | number | boolean>; limit?: number; sort?: Record<string, 1 | -1> }, onData: (docs: T[]) => void, onError?: (error: any) => void): () => void;
|
|
82
|
+
(target: { call: string; payload?: any }, options: { desc?: string; role?: string } | undefined, onData: (result: any) => void, onError?: (error: any) => void): () => void;
|
|
83
|
+
};
|
|
78
84
|
|
|
79
85
|
getAuthUser: OzMethod;
|
|
80
86
|
join: OzMethod;
|
package/package.json
CHANGED
package/scripts/setup-lib.cjs
CHANGED
|
@@ -104,7 +104,7 @@ function ensureDevPackage(projectRoot, pkgPath, name, versionSpec) {
|
|
|
104
104
|
log(`${name} installed successfully!`);
|
|
105
105
|
} catch (e) {
|
|
106
106
|
logError(`⚠️ Automatic installation failed: ${e.message}`);
|
|
107
|
-
logError(`👉 Please run
|
|
107
|
+
logError(`👉 Please run '${installCmd}' manually.`);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
|