@travetto/schema 5.0.0-rc.1 → 5.0.0-rc.3

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
@@ -313,7 +313,7 @@ This feature is meant to allow for simple Typescript types to be able to be back
313
313
 
314
314
  **Code: Simple Custom Type**
315
315
  ```typescript
316
- import { DataUtil } from '@travetto/base';
316
+ import { DataUtil } from '@travetto/runtime';
317
317
 
318
318
  /**
319
319
  * @concrete #PointImpl
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/schema",
3
- "version": "5.0.0-rc.1",
3
+ "version": "5.0.0-rc.3",
4
4
  "description": "Data type registry for runtime validation, reflection and binding.",
5
5
  "keywords": [
6
6
  "schema",
@@ -27,10 +27,10 @@
27
27
  "directory": "module/schema"
28
28
  },
29
29
  "dependencies": {
30
- "@travetto/registry": "^5.0.0-rc.1"
30
+ "@travetto/registry": "^5.0.0-rc.3"
31
31
  },
32
32
  "peerDependencies": {
33
- "@travetto/transformer": "^5.0.0-rc.1"
33
+ "@travetto/transformer": "^5.0.0-rc.2"
34
34
  },
35
35
  "peerDependenciesMeta": {
36
36
  "@travetto/transformer": {
package/src/bind-util.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Class, ConcreteClass, TypedObject } from '@travetto/base';
1
+ import { Class, ConcreteClass, TypedObject } from '@travetto/runtime';
2
2
 
3
3
  import { DataUtil } from './data';
4
4
  import { AllViewⲐ } from './internal/types';
package/src/data.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { isNumberObject as isNum, isBooleanObject as isBool, isStringObject as isStr } from 'node:util/types';
2
2
 
3
- import { Class, ClassInstance, TypedObject } from '@travetto/base';
3
+ import { Class, ClassInstance, TypedObject } from '@travetto/runtime';
4
4
 
5
5
  const REGEX_PAT = /[\/](.*)[\/](i|g|m|s)?/;
6
6
 
@@ -1,4 +1,4 @@
1
- import { Class, ClassInstance } from '@travetto/base';
1
+ import { Class, ClassInstance } from '@travetto/runtime';
2
2
 
3
3
  import { DescribableConfig } from '../service/types';
4
4
  import { SchemaRegistry } from '../service/registry';
@@ -1,4 +1,4 @@
1
- import { ClassInstance } from '@travetto/base';
1
+ import { ClassInstance } from '@travetto/runtime';
2
2
 
3
3
  import { SchemaRegistry } from '../service/registry';
4
4
  import { CommonRegExp } from '../validate/regexp';
@@ -1,4 +1,4 @@
1
- import { Class } from '@travetto/base';
1
+ import { Class } from '@travetto/runtime';
2
2
 
3
3
  import { BindUtil } from '../bind-util';
4
4
  import { SchemaRegistry } from '../service/registry';
package/src/global.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Class } from '@travetto/base';
1
+ import type { Class } from '@travetto/runtime';
2
2
  import type { DeepPartial } from './types';
3
3
 
4
4
  declare global {
package/src/name.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { RuntimeIndex } from '@travetto/manifest';
1
+ import { describeFunction } from '@travetto/runtime';
2
2
  import { ClassConfig } from './service/types';
3
3
 
4
4
  const SYN_RE = /(__)(\d+)Ⲑsyn$/;
@@ -19,7 +19,7 @@ export class SchemaNameResolver {
19
19
 
20
20
  getName(schema: ClassConfig): string {
21
21
  const id = schema.class.Ⲑid;
22
- if (RuntimeIndex.getFunctionMetadataFromClass(schema.class)?.synthetic && SYN_RE.test(schema.class.name)) {
22
+ if (describeFunction(schema.class)?.synthetic && SYN_RE.test(schema.class.name)) {
23
23
  if (!this.#schemaIdToName.has(id)) {
24
24
  const name = schema.class.name.replace(SYN_RE, (_, pref, uid) => `__${(+uid % this.#base).toString().padStart(this.#digits, '0')}`);
25
25
  this.#schemaIdToName.set(id, name);
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter } from 'node:events';
2
2
 
3
- import { Class } from '@travetto/base';
3
+ import { Class } from '@travetto/runtime';
4
4
  import { ChangeEvent } from '@travetto/registry';
5
5
 
6
6
  import { FieldConfig, ClassConfig } from './types';
@@ -1,5 +1,4 @@
1
- import { RuntimeIndex } from '@travetto/manifest';
2
- import { Class, AppError } from '@travetto/base';
1
+ import { Class, AppError, describeFunction } from '@travetto/runtime';
3
2
  import { MetadataRegistry, RootRegistry, ChangeEvent } from '@travetto/registry';
4
3
 
5
4
  import { ClassList, FieldConfig, ClassConfig, SchemaConfig, ViewFieldsConfig, ViewConfig } from './types';
@@ -188,7 +187,7 @@ class $SchemaRegistry extends MetadataRegistry<ClassConfig, FieldConfig> {
188
187
  class: cls,
189
188
  validators: [],
190
189
  subTypeField: 'type',
191
- baseType: RuntimeIndex.getFunctionMetadata(cls)?.abstract,
190
+ baseType: describeFunction(cls)?.abstract,
192
191
  metadata: {},
193
192
  methods: {},
194
193
  views: {
@@ -1,4 +1,4 @@
1
- import { Class } from '@travetto/base';
1
+ import { Class } from '@travetto/runtime';
2
2
  import { Primitive } from '@travetto/schema';
3
3
 
4
4
  import { AllViewⲐ } from '../internal/types';
@@ -1,4 +1,4 @@
1
- import { Class, AppError } from '@travetto/base';
1
+ import { Class, AppError } from '@travetto/runtime';
2
2
  import { ValidationError } from './types';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { TypedObject } from '@travetto/base';
1
+ import { TypedObject } from '@travetto/runtime';
2
2
  import { Messages } from './messages';
3
3
 
4
4
  declare global {
@@ -1,4 +1,4 @@
1
- import { Class, ClassInstance, TypedObject } from '@travetto/base';
1
+ import { Class, ClassInstance, TypedObject } from '@travetto/runtime';
2
2
 
3
3
  import { FieldConfig, SchemaConfig } from '../service/types';
4
4
  import { SchemaRegistry } from '../service/registry';