@travetto/model 3.4.0-rc.8 → 3.4.1

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020 ArcSine Technologies
3
+ Copyright (c) 2023 ArcSine Technologies
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/model",
3
- "version": "3.4.0-rc.8",
3
+ "version": "3.4.1",
4
4
  "description": "Datastore abstraction for core operations.",
5
5
  "keywords": [
6
6
  "datastore",
@@ -26,14 +26,14 @@
26
26
  "directory": "module/model"
27
27
  },
28
28
  "dependencies": {
29
- "@travetto/config": "^3.4.0-rc.7",
30
- "@travetto/di": "^3.4.0-rc.7",
31
- "@travetto/registry": "^3.4.0-rc.8",
32
- "@travetto/schema": "^3.4.0-rc.7"
29
+ "@travetto/config": "^3.4.1",
30
+ "@travetto/di": "^3.4.1",
31
+ "@travetto/registry": "^3.4.1",
32
+ "@travetto/schema": "^3.4.1"
33
33
  },
34
34
  "peerDependencies": {
35
- "@travetto/cli": "^3.4.0-rc.9",
36
- "@travetto/test": "^3.4.0-rc.7"
35
+ "@travetto/cli": "^3.4.3",
36
+ "@travetto/test": "^3.4.1"
37
37
  },
38
38
  "peerDependenciesMeta": {
39
39
  "@travetto/cli": {
@@ -1,4 +1,4 @@
1
- import { ConsoleManager, GlobalEnvConfig } from '@travetto/base';
1
+ import { ConsoleManager, EnvInit } from '@travetto/base';
2
2
  import { CliValidationError, CliCommandShape, cliTpl } from '@travetto/cli';
3
3
  import { RootRegistry } from '@travetto/registry';
4
4
 
@@ -16,7 +16,7 @@ export abstract class BaseModelCommand implements CliCommandShape {
16
16
 
17
17
  abstract getOp(): keyof ModelStorageSupport;
18
18
 
19
- envInit(): GlobalEnvConfig {
19
+ envInit(): EnvInit {
20
20
  return { debug: false };
21
21
  }
22
22
 
@@ -40,7 +40,7 @@ export abstract class BaseModelCommand implements CliCommandShape {
40
40
  await RootRegistry.init();
41
41
 
42
42
  const candidates = await ModelCandidateUtil.export(this.getOp());
43
- if (!candidates.providers.includes(provider)) {
43
+ if (provider && !candidates.providers.includes(provider)) {
44
44
  return { message: `provider: ${provider} is not a valid provider`, source: 'arg' };
45
45
  }
46
46
  const badModel = models.find(x => x !== '*' && !candidates.models.includes(x));
@@ -42,7 +42,7 @@ export class ModelCandidateUtil {
42
42
  static async getProviders(op?: keyof ModelStorageSupport): Promise<InjectableConfig[]> {
43
43
  // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
44
44
  const types = DependencyRegistry.getCandidateTypes<ModelStorageSupport>(ModelStorageSupportTarget as unknown as Class<ModelStorageSupport>);
45
- return types.filter(x => !op || x.class.prototype[op]);
45
+ return types.filter(x => !op || x.class.prototype?.[op]);
46
46
  }
47
47
 
48
48
  /**
@@ -12,7 +12,7 @@ import { ModelStreamSupport } from '../../src/service/stream';
12
12
  @Suite()
13
13
  export abstract class ModelStreamSuite extends BaseModelSuite<ModelStreamSupport> {
14
14
 
15
- fixture = new TestFixtures(['@travetto/model#support/fixtures']);
15
+ fixture = new TestFixtures(['@travetto/model']);
16
16
 
17
17
  async getHash(stream: Readable): Promise<string> {
18
18
  const hash = crypto.createHash('sha1');