@travetto/schema 3.4.3 → 4.0.0-rc.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
@@ -314,7 +314,7 @@ This feature is meant to allow for simple Typescript types to be able to be back
314
314
  import { DataUtil } from '@travetto/base';
315
315
 
316
316
  /**
317
- * @concrete .:PointImpl
317
+ * @concrete #PointImpl
318
318
  */
319
319
  export type Point = [number, number];
320
320
 
package/__index__.ts CHANGED
@@ -1,4 +1,4 @@
1
- /// <reference path="./src/typings.d.ts" />
1
+ /// <reference path="./src/global.d.ts" />
2
2
 
3
3
  export * from './src/decorator/field';
4
4
  export * from './src/decorator/schema';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/schema",
3
- "version": "3.4.3",
3
+ "version": "4.0.0-rc.0",
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": "^3.4.1"
30
+ "@travetto/registry": "^4.0.0-rc.0"
31
31
  },
32
32
  "peerDependencies": {
33
- "@travetto/transformer": "^3.4.1"
33
+ "@travetto/transformer": "^4.0.0-rc.0"
34
34
  },
35
35
  "peerDependenciesMeta": {
36
36
  "@travetto/transformer": {
@@ -13,7 +13,7 @@ declare global {
13
13
 
14
14
  namespace NodeJS {
15
15
  /**
16
- * @concrete stream:Readable
16
+ * @concrete node:stream#Readable
17
17
  */
18
18
  interface ReadableStream { }
19
19
  }
@@ -21,7 +21,7 @@ declare global {
21
21
 
22
22
  declare module 'stream' {
23
23
  /**
24
- * @concrete stream:Readable
24
+ * @concrete node:stream#Readable
25
25
  */
26
26
  interface Readable { }
27
27
  }
package/src/name.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { RootIndex } from '@travetto/manifest';
1
+ import { RuntimeIndex } from '@travetto/manifest';
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 (RootIndex.getFunctionMetadataFromClass(schema.class)?.synthetic && SYN_RE.test(schema.class.name)) {
22
+ if (RuntimeIndex.getFunctionMetadataFromClass(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,4 +1,4 @@
1
- import { EventEmitter } from 'events';
1
+ import { EventEmitter } from 'node:events';
2
2
 
3
3
  import { Class } from '@travetto/base';
4
4
  import { ChangeEvent } from '@travetto/registry';
@@ -1,4 +1,4 @@
1
- import { RootIndex } from '@travetto/manifest';
1
+ import { RuntimeIndex } from '@travetto/manifest';
2
2
  import { Class, AppError } from '@travetto/base';
3
3
  import { MetadataRegistry, RootRegistry, ChangeEvent } from '@travetto/registry';
4
4
 
@@ -186,7 +186,7 @@ class $SchemaRegistry extends MetadataRegistry<ClassConfig, FieldConfig> {
186
186
  class: cls,
187
187
  validators: [],
188
188
  subTypeField: 'type',
189
- baseType: RootIndex.getFunctionMetadata(cls)?.abstract,
189
+ baseType: RuntimeIndex.getFunctionMetadata(cls)?.abstract,
190
190
  metadata: {},
191
191
  methods: {},
192
192
  views: {