diff --git a/index.js b/index.js
index 516e240..0b3a12a 100644
--- a/index.js
+++ b/index.js
@@ -10,6 +10,7 @@ const { backfillAll } = require("./lib/entityIds");
const { ensureManagedSchema } = require("./lib/rowIdentity");
const { installAllWraps } = require("./lib/wrap");
const { routes } = require("./lib/routes");
+const { configurationWorkflow } = require("./lib/configWorkflow");
const log = (msg) => {
@@ -108,6 +109,9 @@ const onLoad = async (cfg) => {
module.exports = {
sc_plugin_api_version: 1,
plugin_name: PLUGIN_NAME,
+ configuration_workflow: configurationWorkflow,
onLoad: onLoad,
- routes: routes
+ // With configuration_workflow present, Saltcorn invokes capability keys as
+ // (cfg)=>value (state.ts withCfg), so routes must be a function, not the array.
+ routes: () => routes
};
diff --git a/lib/configWorkflow.js b/lib/configWorkflow.js
new file mode 100644
index 0000000..e0d957e
--- /dev/null
+++ b/lib/configWorkflow.js
@@ -0,0 +1,33 @@
+// Minimal configuration_workflow. Its only job is to make dev-deploy show the
+// standard "Configure" cog on the Settings -> Plugins list, consistent with
+// other plugins (the cog renders iff the module exports configuration_workflow
+// -- see server/routes/plugins.js cfg_link). dev-deploy is actually configured
+// from its own dashboard under /admin/dev-deploy/, so the single step just links
+// there.
+
+const Workflow = require("@saltcorn/data/models/workflow");
+const Form = require("@saltcorn/data/models/form");
+
+const DASHBOARD_URL = "/admin/dev-deploy/";
+
+
+const configurationWorkflow = () =>
+ new Workflow({
+ steps: [
+ {
+ name: "dev-deploy",
+ form: async () =>
+ new Form({
+ blurb:
+ "dev-deploy is configured from its own dashboard " +
+ "(environments, peers, plan, journal, conflicts).
" +
+ `` +
+ "Open the dev-deploy dashboard",
+ fields: []
+ })
+ }
+ ]
+ });
+
+
+module.exports = { configurationWorkflow };
diff --git a/lib/constants.js b/lib/constants.js
index 824c2c8..96ee5c7 100644
--- a/lib/constants.js
+++ b/lib/constants.js
@@ -1,7 +1,7 @@
// Compile-time constants for the dev-deploy plugin.
const PLUGIN_NAME = "dev-deploy";
-const PLUGIN_VERSION = "0.0.1";
+const PLUGIN_VERSION = "0.0.2";
// Namespace UUID for deterministic IDs derived from (kind, name).
// Generated once via crypto.randomUUID() and frozen here forever.
diff --git a/package.json b/package.json
index 5dc334f..fb1f7aa 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "dev-deploy",
- "version": "0.0.1",
+ "version": "0.0.2",
"description": "Saltcorn plugin: migrate metadata changes (tables, fields, views, pages, triggers, roles, library, tags) across Dev/Test/Prod environments via an ops journal with stable UUIDs and HMAC-authenticated peer endpoints. Detects concurrent-edit conflicts and offers theirs/mine resolution. User-table row data is never touched.",
"main": "index.js",
"scripts": {