From 490c045595567c4af315aec5f4bf3be6ea536d24 Mon Sep 17 00:00:00 2001 From: ingalls Date: Thu, 10 Oct 2024 10:03:46 -0600 Subject: [PATCH 1/3] Auto Subscribe --- api/lib/data-mission.ts | 9 +++++++++ api/web/src/components/DataEdit.vue | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/api/lib/data-mission.ts b/api/lib/data-mission.ts index 14161a4b4..0e38cf50c 100644 --- a/api/lib/data-mission.ts +++ b/api/lib/data-mission.ts @@ -65,6 +65,15 @@ export default class DataMission { mission_token: mission.token || undefined }); + const conn = config.conns.get(data.connection); + if (conn) { + await api.Mission.subscribe(data.name, { + uid: conn.config.uid() + },{ + token: mission.token || undefined + }); + } + // The groups property isn't returned by Create // Make this second call to get the groups - TODO Talk to Josh mission = await api.Mission.get(data.name, {}, { diff --git a/api/web/src/components/DataEdit.vue b/api/web/src/components/DataEdit.vue index 9c70fddd0..c1923b55e 100644 --- a/api/web/src/components/DataEdit.vue +++ b/api/web/src/components/DataEdit.vue @@ -182,8 +182,8 @@ export default { auto_transform: true, mission_sync: true, mission_groups: [], - mission_role: 'MISSION_SUBSCRIBER', - mission_diff: false, + mission_role: 'MISSION_READONLY_SUBSCRIBER', + mission_diff: true, description: '', } } From 50c5997eac6450b5f45257d737364b3763e81ad7 Mon Sep 17 00:00:00 2001 From: ingalls Date: Thu, 10 Oct 2024 10:14:35 -0600 Subject: [PATCH 2/3] Update Deps --- package-lock.json | 11 +++++------ package.json | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index c02c1d342..9063ce255 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,13 +11,12 @@ "dependencies": { "@openaddresses/batch-alarms": "^4.0.0", "@openaddresses/cloudfriend": "^7.0.0", - "@openaddresses/deploy": "^8.0.0" + "@openaddresses/deploy": "^9.0.0" }, "devDependencies": { "@types/xml2js": "^0.4.11", "eslint": "^9.0.0", - "eslint-plugin-n": "^17.2.1", - "minimist": "^1.2.8" + "eslint-plugin-n": "^17.2.1" }, "engines": { "node": ">= 18" @@ -2015,9 +2014,9 @@ } }, "node_modules/@openaddresses/deploy": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@openaddresses/deploy/-/deploy-8.4.0.tgz", - "integrity": "sha512-NEvdYgQr8c3M+MfQRp2hAJ4AbJyJ+gOMHPJ06dhNhMLrKl/3wg57CVvTknTWxOnOCQPtsT435ErhGh8TzYcnkA==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@openaddresses/deploy/-/deploy-9.0.0.tgz", + "integrity": "sha512-tkIA2DIpUHi4QlMU/PhsF8M9GYVD7utp2rSkeqtxUIYwHueoULrNHWgwjdckoX6oTP6O/ttYwgXg9N1mIn9N3A==", "license": "MIT", "dependencies": { "@aws-sdk/client-cloudformation": "^3.272.0", diff --git a/package.json b/package.json index a16d0cac5..cc7b5413f 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "dependencies": { "@openaddresses/batch-alarms": "^4.0.0", "@openaddresses/cloudfriend": "^7.0.0", - "@openaddresses/deploy": "^8.0.0" + "@openaddresses/deploy": "^9.0.0" }, "devDependencies": { "@types/xml2js": "^0.4.11", From 9d290ece9980ba05162cbbe362c8d1cb1bdad9ad Mon Sep 17 00:00:00 2001 From: ingalls Date: Thu, 10 Oct 2024 10:16:41 -0600 Subject: [PATCH 3/3] Fix deps --- api/package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/api/package-lock.json b/api/package-lock.json index 7db4e0c6b..4b99bff01 100644 --- a/api/package-lock.json +++ b/api/package-lock.json @@ -4279,9 +4279,9 @@ } }, "node_modules/@tak-ps/node-cot": { - "version": "12.5.0", - "resolved": "https://registry.npmjs.org/@tak-ps/node-cot/-/node-cot-12.5.0.tgz", - "integrity": "sha512-mQsD2XY8BRMSTgqs/mjgAqukY8+gyBEQQ+PPF0pbgjIZStNzdHJlVddhRGD6gIs2ay5elz4lS/A2MoXwTAJMCw==", + "version": "12.5.2", + "resolved": "https://registry.npmjs.org/@tak-ps/node-cot/-/node-cot-12.5.2.tgz", + "integrity": "sha512-AffvRI+2e+RIDR+Huy3XSXYiK/6WkmSfwo2YdV3okx1JeDiUmm0izkntgrvAw7Q7laD3Y+xolhkBfAIPrJPE8Q==", "license": "MIT", "dependencies": { "@openaddresses/batch-error": "^2.4.0", @@ -7489,9 +7489,9 @@ } }, "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", "license": "MIT", "dependencies": { "asynckit": "^0.4.0",