@travetto/model 7.0.6 → 7.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.
package/README.md CHANGED
@@ -351,9 +351,9 @@ $ trv model:export --help
351
351
  Usage: model:export [options] <provider:string> <models...:string>
352
352
 
353
353
  Options:
354
- -e, --env <string> Application environment
355
- -m, --module <module> Module to run for
356
- -h, --help display help for command
354
+ -p, --profile <string> Application profiles
355
+ -m, --module <module> Module to run for
356
+ -h, --help display help for command
357
357
 
358
358
  Providers
359
359
  --------------------
@@ -374,9 +374,9 @@ $ trv model:install --help
374
374
  Usage: model:install [options] <provider:string> <models...:string>
375
375
 
376
376
  Options:
377
- -e, --env <string> Application environment
378
- -m, --module <module> Module to run for
379
- -h, --help display help for command
377
+ -p, --profile <string> Application profiles
378
+ -m, --module <module> Module to run for
379
+ -h, --help display help for command
380
380
 
381
381
  Providers
382
382
  --------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/model",
3
- "version": "7.0.6",
3
+ "version": "7.1.0",
4
4
  "type": "module",
5
5
  "description": "Datastore abstraction for core operations.",
6
6
  "keywords": [
@@ -27,14 +27,14 @@
27
27
  "directory": "module/model"
28
28
  },
29
29
  "dependencies": {
30
- "@travetto/config": "^7.0.6",
31
- "@travetto/di": "^7.0.6",
32
- "@travetto/registry": "^7.0.6",
33
- "@travetto/schema": "^7.0.6"
30
+ "@travetto/config": "^7.1.0",
31
+ "@travetto/di": "^7.1.0",
32
+ "@travetto/registry": "^7.1.0",
33
+ "@travetto/schema": "^7.1.0"
34
34
  },
35
35
  "peerDependencies": {
36
- "@travetto/cli": "^7.0.7",
37
- "@travetto/test": "^7.0.6"
36
+ "@travetto/cli": "^7.1.0",
37
+ "@travetto/test": "^7.1.0"
38
38
  },
39
39
  "peerDependenciesMeta": {
40
40
  "@travetto/cli": {
@@ -34,14 +34,11 @@ export class ModelExpiryUtil {
34
34
  static registerCull(service: ModelExpirySupport & { readonly config?: { cullRate?: number | TimeSpan } }): void {
35
35
  const cullable = ModelRegistryIndex.getClasses().filter(cls => !!ModelRegistryIndex.getConfig(cls).expiresAt);
36
36
  if (service.deleteExpired && cullable.length) {
37
- const running = new AbortController();
38
37
  const cullInterval = TimeUtil.asMillis(service.config?.cullRate ?? '10m');
39
38
 
40
- ShutdownManager.onGracefulShutdown(async () => running.abort());
41
-
42
39
  (async (): Promise<void> => {
43
40
  await Util.nonBlockingTimeout(1000);
44
- while (!running.signal.aborted) {
41
+ while (!ShutdownManager.signal.aborted) {
45
42
  await Util.nonBlockingTimeout(cullInterval);
46
43
  await Promise.all(cullable.map(cls => service.deleteExpired(cls)));
47
44
  }
@@ -13,9 +13,6 @@ import { ModelCandidateUtil } from './bin/candidate.ts';
13
13
  @Schema()
14
14
  export abstract class BaseModelCommand implements CliCommandShape {
15
15
 
16
- /** Application Environment */
17
- env?: string;
18
-
19
16
  abstract getOperation(): keyof ModelStorageSupport;
20
17
 
21
18
  preMain(): void {
@@ -7,7 +7,7 @@ import { ModelCandidateUtil } from './bin/candidate.ts';
7
7
  /**
8
8
  * Exports model schemas
9
9
  */
10
- @CliCommand({ with: { env: true, module: true } })
10
+ @CliCommand({ with: { profiles: true, module: true } })
11
11
  export class ModelExportCommand extends BaseModelCommand {
12
12
 
13
13
  getOperation(): 'exportModel' { return 'exportModel'; }
@@ -7,7 +7,7 @@ import { ModelCandidateUtil } from './bin/candidate.ts';
7
7
  /**
8
8
  * Installing models
9
9
  */
10
- @CliCommand({ with: { env: true, module: true } })
10
+ @CliCommand({ with: { profiles: true, module: true } })
11
11
  export class ModelInstallCommand extends BaseModelCommand {
12
12
 
13
13
  getOperation(): 'upsertModel' { return 'upsertModel'; }