@lotics/cli 0.30.2 → 0.31.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/src/app_commands.js +8 -0
- package/dist/src/client.d.ts +8 -0
- package/dist/src/client.js +10 -0
- package/package.json +1 -1
package/dist/src/app_commands.js
CHANGED
|
@@ -66,6 +66,10 @@ function readAppMeta(projectDir) {
|
|
|
66
66
|
version_number: pkg.lotics.version_number ?? null,
|
|
67
67
|
workflows: pkg.lotics.workflows ?? {},
|
|
68
68
|
queries: pkg.lotics.queries ?? {},
|
|
69
|
+
// Left as `undefined` when absent so the deploy omits them and the
|
|
70
|
+
// App row's icon/theme is preserved.
|
|
71
|
+
icon: pkg.lotics.icon,
|
|
72
|
+
theme: pkg.lotics.theme,
|
|
69
73
|
};
|
|
70
74
|
}
|
|
71
75
|
function writeAppMeta(projectDir, meta) {
|
|
@@ -293,6 +297,10 @@ export async function appDeploy(client, args) {
|
|
|
293
297
|
// Sync apps.queries from the manifest. Server validates each query
|
|
294
298
|
// template (parseQueryNode, table access, param coverage).
|
|
295
299
|
queries: meta.queries ?? {},
|
|
300
|
+
// Optional icon/theme overrides — only sent when the manifest
|
|
301
|
+
// declares them (undefined ⇒ omitted ⇒ App row left untouched).
|
|
302
|
+
icon: meta.icon,
|
|
303
|
+
theme: meta.theme,
|
|
296
304
|
// Opt into destructive workflow removal. Default false — the server
|
|
297
305
|
// rejects deploys whose manifest is missing aliases the App row has.
|
|
298
306
|
force_workflow_sync: args.forceWorkflowSync,
|
package/dist/src/client.d.ts
CHANGED
|
@@ -197,6 +197,14 @@ export declare class LoticsClient {
|
|
|
197
197
|
ast: unknown;
|
|
198
198
|
params?: Record<string, unknown>;
|
|
199
199
|
}>;
|
|
200
|
+
/**
|
|
201
|
+
* App icon (Lucide name) + theme `{ color }` from `package.json#lotics`.
|
|
202
|
+
* `undefined` ⇒ not sent ⇒ the deploy leaves the App row's icon/theme
|
|
203
|
+
* as-is. A present value is applied authoritatively. `icon` rides as a
|
|
204
|
+
* raw form field; `theme` is an object, so it's JSON-encoded.
|
|
205
|
+
*/
|
|
206
|
+
icon?: string;
|
|
207
|
+
theme?: Record<string, unknown>;
|
|
200
208
|
/**
|
|
201
209
|
* Opt into destructive workflow removal. When false/absent, the server
|
|
202
210
|
* rejects a deploy whose `workflows` map is missing aliases that exist
|
package/dist/src/client.js
CHANGED
|
@@ -216,6 +216,16 @@ export class LoticsClient {
|
|
|
216
216
|
// Always send queries — empty object clears any previously-declared
|
|
217
217
|
// named queries. Server validates each template.
|
|
218
218
|
formData.append("queries", JSON.stringify(args.queries ?? {}));
|
|
219
|
+
// icon/theme are optional overrides — only sent when the manifest
|
|
220
|
+
// declares them, so a deploy never clobbers a value set in the UI.
|
|
221
|
+
// `icon` is a plain string → raw field, like `message`. `theme` is an
|
|
222
|
+
// object → JSON-encoded, like `workflows`/`queries`.
|
|
223
|
+
if (args.icon !== undefined) {
|
|
224
|
+
formData.append("icon", args.icon);
|
|
225
|
+
}
|
|
226
|
+
if (args.theme !== undefined) {
|
|
227
|
+
formData.append("theme", JSON.stringify(args.theme));
|
|
228
|
+
}
|
|
219
229
|
// Only post the override flag when the user explicitly opts in. The
|
|
220
230
|
// server defaults to "honor the guard" — opt-in is loud, opt-out
|
|
221
231
|
// requires intent.
|