@git.zone/cli 7.4.1 → 8.1.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.
Files changed (39) hide show
  1. package/dist_ts/00_commitinfo_data.js +1 -1
  2. package/dist_ts/mod_services/classes.dockercontainer.d.ts +13 -2
  3. package/dist_ts/mod_services/classes.dockercontainer.js +40 -40
  4. package/dist_ts/mod_services/classes.globalregistry.d.ts +12 -0
  5. package/dist_ts/mod_services/classes.globalregistry.js +96 -13
  6. package/dist_ts/mod_services/classes.globalregistrystore.d.ts +7 -1
  7. package/dist_ts/mod_services/classes.globalregistrystore.js +6 -6
  8. package/dist_ts/mod_services/classes.legacymongomigration.d.ts +239 -0
  9. package/dist_ts/mod_services/classes.legacymongomigration.js +970 -0
  10. package/dist_ts/mod_services/classes.serviceconfiguration.d.ts +112 -15
  11. package/dist_ts/mod_services/classes.serviceconfiguration.js +274 -62
  12. package/dist_ts/mod_services/classes.servicedatamarker.d.ts +42 -1
  13. package/dist_ts/mod_services/classes.servicedatamarker.js +101 -8
  14. package/dist_ts/mod_services/classes.servicemanager.d.ts +99 -33
  15. package/dist_ts/mod_services/classes.servicemanager.js +652 -384
  16. package/dist_ts/mod_services/classes.servicepruner.js +27 -20
  17. package/dist_ts/mod_services/index.js +62 -13
  18. package/dist_ts/mod_services/mod.plugins.d.ts +2 -1
  19. package/dist_ts/mod_services/mod.plugins.js +4 -2
  20. package/dist_ts_migration/002.runtime-config.d.ts +1 -1
  21. package/dist_ts_migration/002.runtime-config.js +8 -2
  22. package/dist_ts_migration/003.service-data-marker.js +125 -30
  23. package/dist_ts_migration/004.global-registry.js +30 -8
  24. package/package.json +1 -1
  25. package/readme.md +197 -32
  26. package/ts/00_commitinfo_data.ts +1 -1
  27. package/ts/mod_services/classes.dockercontainer.ts +58 -50
  28. package/ts/mod_services/classes.globalregistry.ts +115 -14
  29. package/ts/mod_services/classes.globalregistrystore.ts +16 -6
  30. package/ts/mod_services/classes.legacymongomigration.ts +1308 -0
  31. package/ts/mod_services/classes.serviceconfiguration.ts +387 -69
  32. package/ts/mod_services/classes.servicedatamarker.ts +149 -8
  33. package/ts/mod_services/classes.servicemanager.ts +877 -454
  34. package/ts/mod_services/classes.servicepruner.ts +27 -19
  35. package/ts/mod_services/index.ts +81 -12
  36. package/ts/mod_services/mod.plugins.ts +4 -1
  37. package/ts_migration/002.runtime-config.ts +8 -1
  38. package/ts_migration/003.service-data-marker.ts +168 -29
  39. package/ts_migration/004.global-registry.ts +38 -7
@@ -146,12 +146,12 @@ export const migrateLegacyGlobalRegistryData = (
146
146
  const rawPorts = rawProject.ports;
147
147
  assertAllowedKeys(
148
148
  rawContainers,
149
- ['mongo', 'minio', 'objectstorage', 'elasticsearch'],
149
+ ['mongo', 'nosqldb', 'minio', 'objectstorage', 'elasticsearch'],
150
150
  `project ${projectPath} containers`,
151
151
  );
152
152
  assertOptionalStrings(
153
153
  rawContainers,
154
- ['mongo', 'minio', 'objectstorage', 'elasticsearch'],
154
+ ['mongo', 'nosqldb', 'minio', 'objectstorage', 'elasticsearch'],
155
155
  `project ${projectPath}.containers`,
156
156
  );
157
157
  assertAllowedKeys(
@@ -172,13 +172,17 @@ export const migrateLegacyGlobalRegistryData = (
172
172
  );
173
173
  }
174
174
  rawLegacy = rawProject.legacy;
175
- assertAllowedKeys(rawLegacy, ['minioContainer'], `project ${projectPath} legacy`);
175
+ assertAllowedKeys(
176
+ rawLegacy,
177
+ ['minioContainer', 'mongoContainer'],
178
+ `project ${projectPath} legacy`,
179
+ );
176
180
  assertOptionalStrings(
177
181
  rawLegacy,
178
- ['minioContainer'],
182
+ ['minioContainer', 'mongoContainer'],
179
183
  `project ${projectPath}.legacy`,
180
184
  );
181
- if (!rawLegacy.minioContainer) {
185
+ if (!rawLegacy.minioContainer && !rawLegacy.mongoContainer) {
182
186
  throw new Error(
183
187
  `Cannot migrate global services registry for ${projectPath}: empty legacy evidence is invalid.`,
184
188
  );
@@ -202,6 +206,26 @@ export const migrateLegacyGlobalRegistryData = (
202
206
  if (typeof rawContainers.minio === 'string') {
203
207
  migrated = true;
204
208
  }
209
+ // Every `containers.mongo` claim was written by a release that ran mongod;
210
+ // the NoSQLDB container is registered under `containers.nosqldb`.
211
+ if (
212
+ rawLegacy.mongoContainer !== undefined &&
213
+ rawContainers.mongo !== undefined &&
214
+ rawLegacy.mongoContainer !== rawContainers.mongo
215
+ ) {
216
+ throw new Error(
217
+ `Cannot migrate global services registry for ${projectPath}: legacy MongoDB references differ.`,
218
+ );
219
+ }
220
+ const mongoContainer =
221
+ typeof rawLegacy.mongoContainer === 'string'
222
+ ? rawLegacy.mongoContainer
223
+ : typeof rawContainers.mongo === 'string'
224
+ ? rawContainers.mongo
225
+ : undefined;
226
+ if (typeof rawContainers.mongo === 'string') {
227
+ migrated = true;
228
+ }
205
229
  if (
206
230
  rawPorts.s3Ui !== undefined &&
207
231
  rawPorts.s3Console !== undefined &&
@@ -222,7 +246,7 @@ export const migrateLegacyGlobalRegistryData = (
222
246
  projectPath: rawProject.projectPath,
223
247
  projectName: rawProject.projectName,
224
248
  containers: {
225
- ...(typeof rawContainers.mongo === 'string' ? { mongo: rawContainers.mongo } : {}),
249
+ ...(typeof rawContainers.nosqldb === 'string' ? { nosqldb: rawContainers.nosqldb } : {}),
226
250
  ...(typeof rawContainers.objectstorage === 'string'
227
251
  ? { objectstorage: rawContainers.objectstorage }
228
252
  : {}),
@@ -238,7 +262,14 @@ export const migrateLegacyGlobalRegistryData = (
238
262
  ? { elasticsearch: rawPorts.elasticsearch }
239
263
  : {}),
240
264
  },
241
- ...(minioContainer ? { legacy: { minioContainer } } : {}),
265
+ ...(minioContainer || mongoContainer
266
+ ? {
267
+ legacy: {
268
+ ...(minioContainer ? { minioContainer } : {}),
269
+ ...(mongoContainer ? { mongoContainer } : {}),
270
+ },
271
+ }
272
+ : {}),
242
273
  enabledServices: serviceMigration.services,
243
274
  lastActive: rawProject.lastActive,
244
275
  };