shinkansen-transmission 2.2.205 → 2.2.207

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 (26) hide show
  1. package/README.md +5 -5
  2. package/babel.config.cjs +0 -18
  3. package/package.json +10 -20
  4. package/src/{index.d.cts → index.d.mts} +9 -5
  5. package/src/transmission/common/index.d.mts +5 -1
  6. package/src/transmission/from-document-to-hash/array/index.mjs +2 -2
  7. package/src/transmission/from-document-to-hash/boolean/index.mjs +1 -1
  8. package/src/transmission/from-document-to-hash/index.d.mts +6 -1
  9. package/src/transmission/from-document-to-hash/index.mjs +1 -1
  10. package/src/transmission/from-document-to-hash/null/index.mjs +1 -1
  11. package/src/transmission/from-document-to-hash/number/index.mjs +1 -1
  12. package/src/transmission/from-document-to-hash/object/index.mjs +2 -2
  13. package/src/transmission/from-document-to-hash/string/index.mjs +1 -1
  14. package/src/transmission/from-hash-to-document/array/index.mjs +2 -2
  15. package/src/transmission/from-hash-to-document/boolean/index.mjs +2 -2
  16. package/src/transmission/from-hash-to-document/index.d.mts +6 -1
  17. package/src/transmission/from-hash-to-document/index.mjs +1 -1
  18. package/src/transmission/from-hash-to-document/null/index.mjs +2 -2
  19. package/src/transmission/from-hash-to-document/number/index.mjs +2 -2
  20. package/src/transmission/from-hash-to-document/object/index.mjs +2 -2
  21. package/src/transmission/from-hash-to-document/string/index.mjs +2 -2
  22. package/src/transmission/index.d.mts +10 -0
  23. package/src/transmission/to-zashiki/index.d.mts +6 -1
  24. package/src/transmission/to-zashiki/transform-root-schema.mjs +1 -1
  25. package/src/transmission/to-zashiki/transform-schema.mjs +1 -1
  26. package/tsconfig.json +0 -11
package/README.md CHANGED
@@ -264,7 +264,7 @@ As you might expect, `meta` contains fields _about_ the Schema, while `elements`
264
264
  schema: Object,
265
265
  rootSchema: Object,
266
266
  isRequired: Boolean,
267
- selectedItems: Array,
267
+ selectedItems: Array
268
268
  },
269
269
  elements: {
270
270
  title: String,
@@ -290,13 +290,13 @@ As you might expect, `meta` contains fields _about_ the Schema, while `elements`
290
290
  schema: Object,
291
291
  rootSchema: Object,
292
292
  isRequired: Boolean,
293
- selectedItems: Array,
293
+ selectedItems: Array
294
294
  },
295
295
  elements: {
296
296
  title: String,
297
297
  description: String,
298
298
  oneOf: {
299
- required: Boolean,
299
+ isRequired: Boolean,
300
300
  selectedItems: Array,
301
301
  items: Array,
302
302
  name: String
@@ -317,7 +317,7 @@ As you might expect, `meta` contains fields _about_ the Schema, while `elements`
317
317
  type: String /* One of "object" "array" "string" "number" "boolean" "null" */,
318
318
  schema: Object,
319
319
  rootSchema: Object,
320
- required: Boolean,
320
+ isRequired: Boolean
321
321
  },
322
322
  elements: {
323
323
  title: String,
@@ -337,7 +337,7 @@ As you might expect, `meta` contains fields _about_ the Schema, while `elements`
337
337
  type: String /* One of "object" "array" "string" "number" "boolean" "null" */,
338
338
  schema: Object,
339
339
  rootSchema: Object,
340
- required: Boolean,
340
+ isRequired: Boolean
341
341
  },
342
342
  elements: {
343
343
  title: String,
package/babel.config.cjs CHANGED
@@ -38,29 +38,11 @@ const presets = [
38
38
  ]
39
39
  ]
40
40
 
41
- const plugins = [
42
- [
43
- 'module-resolver', {
44
- alias: {
45
- 'shinkansen-transmission/transmission/common': './src/transmission/common/index.mjs',
46
- 'shinkansen-transmission/transmission/from-document-to-hash': './src/transmission/from-document-to-hash/index.mjs',
47
- 'shinkansen-transmission/transmission/from-hash-to-document': './src/transmission/from-hash-to-document/index.mjs',
48
- 'shinkansen-transmission/transmission/to-zashiki/transform-root-schema': './src/transmission/to-zashiki/transform-root-schema.mjs',
49
- 'shinkansen-transmission/transmission/to-zashiki/transform-schema': './src/transmission/to-zashiki/transform-schema.mjs',
50
- 'shinkansen-transmission/transmission/to-zashiki': './src/transmission/to-zashiki/index.mjs',
51
- 'shinkansen-transmission/transmission': './src/transmission/index.mjs',
52
- 'shinkansen-transmission': './src/index.cjs'
53
- }
54
- }
55
- ]
56
- ]
57
-
58
41
  module.exports = (api) => {
59
42
  if (api) api.cache.using(env)
60
43
 
61
44
  return {
62
45
  presets,
63
- plugins,
64
46
  ignore: [
65
47
  /node_modules\/(?!shinkansen|@modernpoacher)/
66
48
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shinkansen-transmission",
3
- "version": "2.2.205",
3
+ "version": "2.2.207",
4
4
  "description": "Shinkansen Transmission",
5
5
  "keywords": [
6
6
  "Shinkansen",
@@ -47,7 +47,6 @@
47
47
  "@typescript-eslint/eslint-plugin": "7.18.0",
48
48
  "@typescript-eslint/parser": "7.18.0",
49
49
  "babel-loader": "^9.2.1",
50
- "babel-plugin-module-resolver": "^5.0.2",
51
50
  "c8": "^10.1.2",
52
51
  "chai": "^5.1.2",
53
52
  "core-js": "^3.39.0",
@@ -55,33 +54,24 @@
55
54
  "eslint": "8.57.1",
56
55
  "eslint-config-love": "47.0.0",
57
56
  "eslint-config-standard": "^17.1.0",
58
- "eslint-import-resolver-babel-module": "^5.3.2",
59
57
  "husky": "^9.1.7",
60
- "mocha": "^10.8.2",
58
+ "mocha": "^11.0.1",
61
59
  "rimraf": "^6.0.1"
62
60
  },
61
+ "imports": {
62
+ "#transmission": "./src/index.mjs",
63
+ "#transmission/transmission": "./src/transmission/index.mjs",
64
+ "#transmission/transmission/*": "./src/transmission/*/index.mjs",
65
+ "#transmission/transmission/to-zashiki/transform-root-schema": "./src/transmission/to-zashiki/transform-root-schema.mjs",
66
+ "#transmission/transmission/to-zashiki/transform-schema": "./src/transmission/to-zashiki/transform-schema.mjs"
67
+ },
63
68
  "exports": {
64
69
  ".": {
65
70
  "require": "./src/index.cjs",
66
71
  "import": "./src/index.mjs"
67
72
  },
68
73
  "./transmission": "./src/transmission/index.mjs",
69
- "./transmission/common": "./src/transmission/common/index.mjs",
70
- "./transmission/from-document-to-hash": "./src/transmission/from-document-to-hash/index.mjs",
71
- "./transmission/from-document-to-hash/array": "./src/transmission/from-document-to-hash/array/index.mjs",
72
- "./transmission/from-document-to-hash/boolean": "./src/transmission/from-document-to-hash/boolean/index.mjs",
73
- "./transmission/from-document-to-hash/null": "./src/transmission/from-hash-to-document/null/index.mjs",
74
- "./transmission/from-document-to-hash/number": "./src/transmission/from-document-to-hash/number/index.mjs",
75
- "./transmission/from-document-to-hash/object": "./src/transmission/from-document-to-hash/object/index.mjs",
76
- "./transmission/from-document-to-hash/string": "./src/transmission/from-document-to-hash/string/index.mjs",
77
- "./transmission/from-hash-to-document": "./src/transmission/from-hash-to-document/index.mjs",
78
- "./transmission/from-hash-to-document/array": "./src/transmission/from-hash-to-document/array/index.mjs",
79
- "./transmission/from-hash-to-document/boolean": "./src/transmission/from-hash-to-document/boolean/index.mjs",
80
- "./transmission/from-hash-to-document/null": "./src/transmission/from-hash-to-document/null/index.mjs",
81
- "./transmission/from-hash-to-document/number": "./src/transmission/from-hash-to-document/number/index.mjs",
82
- "./transmission/from-hash-to-document/object": "./src/transmission/from-hash-to-document/object/index.mjs",
83
- "./transmission/from-hash-to-document/string": "./src/transmission/from-hash-to-document/string/index.mjs",
84
- "./transmission/to-zashiki": "./src/transmission/to-zashiki/index.mjs",
74
+ "./transmission/*": "./src/transmission/*/index.mjs",
85
75
  "./transmission/to-zashiki/transform-root-schema": "./src/transmission/to-zashiki/transform-root-schema.mjs",
86
76
  "./transmission/to-zashiki/transform-schema": "./src/transmission/to-zashiki/transform-schema.mjs"
87
77
  }
@@ -41,9 +41,13 @@ declare namespace Zashiki {
41
41
  }
42
42
  }
43
43
 
44
- declare module 'shinkansen-transmission/transmission' {
45
- export * as common from 'shinkansen-transmission/transmission/common'
46
- export { default as fromDocumentToHash } from 'shinkansen-transmission/transmission/from-document-to-hash'
47
- export { default as fromHashToDocument } from 'shinkansen-transmission/transmission/from-hash-to-document'
48
- export { default as toZashiki } from 'shinkansen-transmission/transmission/to-zashiki'
44
+ declare module '#transmission' {
45
+ export * as common from '#transmission/transmission/common'
46
+ export { default as fromDocumentToHash } from '#transmission/transmission/from-document-to-hash'
47
+ export { default as fromHashToDocument } from '#transmission/transmission/from-hash-to-document'
48
+ export { default as toZashiki } from '#transmission/transmission/to-zashiki'
49
+ }
50
+
51
+ declare module 'shinkansen-transmission' {
52
+ export * from '#transmission'
49
53
  }
@@ -1,4 +1,4 @@
1
- declare module 'shinkansen-transmission/transmission/common' {
1
+ declare module '#transmission/transmission/common' {
2
2
  type ObjectLiteralType = Zashiki.ObjectLiteralType
3
3
  type ObjectType = Zashiki.ObjectType
4
4
  type ArrayLiteralType = Zashiki.ArrayLiteralType
@@ -117,3 +117,7 @@ declare module 'shinkansen-transmission/transmission/common' {
117
117
 
118
118
  export function getStep (schema: SchemaType | undefined): { step: number } | ObjectLiteralType
119
119
  }
120
+
121
+ declare module 'shinkansen-transmission/transmission/common' {
122
+ export * from '#transmission/transmission/common'
123
+ }
@@ -4,11 +4,11 @@ import {
4
4
  toString,
5
5
  isArray,
6
6
  getUri
7
- } from 'shinkansen-transmission/transmission/common'
7
+ } from '#transmission/transmission/common'
8
8
 
9
9
  import {
10
10
  transformArray
11
- } from 'shinkansen-transmission/transmission/from-document-to-hash'
11
+ } from '#transmission/transmission/from-document-to-hash'
12
12
 
13
13
  const log = debug('shinkansen-transmission/from-document-to-hash/array')
14
14
 
@@ -10,7 +10,7 @@ import {
10
10
  getOneOf,
11
11
  getUri,
12
12
  transformValueIndexFor
13
- } from 'shinkansen-transmission/transmission/common'
13
+ } from '#transmission/transmission/common'
14
14
 
15
15
  const log = debug('shinkansen-transmission/from-document-to-hash/boolean')
16
16
 
@@ -1,4 +1,4 @@
1
- declare module 'shinkansen-transmission/transmission/from-document-to-hash' {
1
+ declare module '#transmission/transmission/from-document-to-hash' {
2
2
  type ObjectLiteralType = Zashiki.ObjectLiteralType
3
3
  type ObjectType = Zashiki.ObjectType
4
4
 
@@ -15,3 +15,8 @@ declare module 'shinkansen-transmission/transmission/from-document-to-hash' {
15
15
 
16
16
  export default function transform (document: DocumentType | undefined, schema: SchemaType | undefined, values: ObjectType | ObjectLiteralType | undefined, parentUri: string | undefined, uri: string | undefined): HashType | undefined
17
17
  }
18
+
19
+ declare module 'shinkansen-transmission/transmission/from-document-to-hash' {
20
+ export { default } from '#transmission/transmission/from-document-to-hash'
21
+ export * from '#transmission/transmission/from-document-to-hash'
22
+ }
@@ -15,7 +15,7 @@ import {
15
15
  transformValueIndexFor,
16
16
  transformEqualIndexFor,
17
17
  transformValue
18
- } from 'shinkansen-transmission/transmission/common'
18
+ } from '#transmission/transmission/common'
19
19
 
20
20
  const log = debug('shinkansen-transmission/from-document-to-hash')
21
21
 
@@ -10,7 +10,7 @@ import {
10
10
  getOneOf,
11
11
  getUri,
12
12
  transformValueIndexFor
13
- } from 'shinkansen-transmission/transmission/common'
13
+ } from '#transmission/transmission/common'
14
14
 
15
15
  const log = debug('shinkansen-transmission/from-document-to-hash/null')
16
16
 
@@ -10,7 +10,7 @@ import {
10
10
  getOneOf,
11
11
  getUri,
12
12
  transformValueIndexFor
13
- } from 'shinkansen-transmission/transmission/common'
13
+ } from '#transmission/transmission/common'
14
14
 
15
15
  const log = debug('shinkansen-transmission/from-document-to-hash/number')
16
16
 
@@ -4,11 +4,11 @@ import {
4
4
  toString,
5
5
  isObject,
6
6
  getUri
7
- } from 'shinkansen-transmission/transmission/common'
7
+ } from '#transmission/transmission/common'
8
8
 
9
9
  import {
10
10
  transformObject
11
- } from 'shinkansen-transmission/transmission/from-document-to-hash'
11
+ } from '#transmission/transmission/from-document-to-hash'
12
12
 
13
13
  const log = debug('shinkansen-transmission/from-document-to-hash/object')
14
14
 
@@ -10,7 +10,7 @@ import {
10
10
  getOneOf,
11
11
  getUri,
12
12
  transformValueIndexFor
13
- } from 'shinkansen-transmission/transmission/common'
13
+ } from '#transmission/transmission/common'
14
14
 
15
15
  const log = debug('shinkansen-transmission/from-document-to-hash/string')
16
16
 
@@ -2,11 +2,11 @@ import debug from 'debug'
2
2
 
3
3
  import {
4
4
  getUri
5
- } from 'shinkansen-transmission/transmission/common'
5
+ } from '#transmission/transmission/common'
6
6
 
7
7
  import {
8
8
  transformArray
9
- } from 'shinkansen-transmission/transmission/from-hash-to-document'
9
+ } from '#transmission/transmission/from-hash-to-document'
10
10
 
11
11
  const log = debug('shinkansen-transmission/from-hash-to-document/array')
12
12
 
@@ -2,11 +2,11 @@ import debug from 'debug'
2
2
 
3
3
  import {
4
4
  getUri
5
- } from 'shinkansen-transmission/transmission/common'
5
+ } from '#transmission/transmission/common'
6
6
 
7
7
  import {
8
8
  transformBoolean
9
- } from 'shinkansen-transmission/transmission/from-hash-to-document'
9
+ } from '#transmission/transmission/from-hash-to-document'
10
10
 
11
11
  const log = debug('shinkansen-transmission/from-hash-to-document/boolean')
12
12
 
@@ -1,4 +1,4 @@
1
- declare module 'shinkansen-transmission/transmission/from-hash-to-document' {
1
+ declare module '#transmission/transmission/from-hash-to-document' {
2
2
  type ObjectLiteralType = Zashiki.ObjectLiteralType
3
3
  type ObjectType = Zashiki.ObjectType
4
4
  type ArrayLiteralType = Zashiki.ArrayLiteralType
@@ -28,3 +28,8 @@ declare module 'shinkansen-transmission/transmission/from-hash-to-document' {
28
28
 
29
29
  export default function transform (hash: HashType | undefined, rootSchema: SchemaType | undefined, parentUri: string | undefined, uri: string | undefined): DocumentType | undefined
30
30
  }
31
+
32
+ declare module 'shinkansen-transmission/transmission/from-hash-to-document' {
33
+ export { default } from '#transmission/transmission/from-hash-to-document'
34
+ export * from '#transmission/transmission/from-hash-to-document'
35
+ }
@@ -12,7 +12,7 @@ import {
12
12
  getOneOf,
13
13
  getUri,
14
14
  transformValue
15
- } from 'shinkansen-transmission/transmission/common'
15
+ } from '#transmission/transmission/common'
16
16
 
17
17
  const log = debug('shinkansen-transmission/from-hash-to-document')
18
18
 
@@ -2,11 +2,11 @@ import debug from 'debug'
2
2
 
3
3
  import {
4
4
  getUri
5
- } from 'shinkansen-transmission/transmission/common'
5
+ } from '#transmission/transmission/common'
6
6
 
7
7
  import {
8
8
  transformNull
9
- } from 'shinkansen-transmission/transmission/from-hash-to-document'
9
+ } from '#transmission/transmission/from-hash-to-document'
10
10
 
11
11
  const log = debug('shinkansen-transmission/from-hash-to-document/null')
12
12
 
@@ -2,11 +2,11 @@ import debug from 'debug'
2
2
 
3
3
  import {
4
4
  getUri
5
- } from 'shinkansen-transmission/transmission/common'
5
+ } from '#transmission/transmission/common'
6
6
 
7
7
  import {
8
8
  transformNumber
9
- } from 'shinkansen-transmission/transmission/from-hash-to-document'
9
+ } from '#transmission/transmission/from-hash-to-document'
10
10
 
11
11
  const log = debug('shinkansen-transmission/from-hash-to-document/number')
12
12
 
@@ -2,11 +2,11 @@ import debug from 'debug'
2
2
 
3
3
  import {
4
4
  getUri
5
- } from 'shinkansen-transmission/transmission/common'
5
+ } from '#transmission/transmission/common'
6
6
 
7
7
  import {
8
8
  transformObject
9
- } from 'shinkansen-transmission/transmission/from-hash-to-document'
9
+ } from '#transmission/transmission/from-hash-to-document'
10
10
 
11
11
  const log = debug('shinkansen-transmission/from-hash-to-document/object')
12
12
 
@@ -2,11 +2,11 @@ import debug from 'debug'
2
2
 
3
3
  import {
4
4
  getUri
5
- } from 'shinkansen-transmission/transmission/common'
5
+ } from '#transmission/transmission/common'
6
6
 
7
7
  import {
8
8
  transformString
9
- } from 'shinkansen-transmission/transmission/from-hash-to-document'
9
+ } from '#transmission/transmission/from-hash-to-document'
10
10
 
11
11
  const log = debug('shinkansen-transmission/from-hash-to-document/string')
12
12
 
@@ -0,0 +1,10 @@
1
+ declare module '#transmission/transmission' {
2
+ export * as common from '#transmission/transmission/common'
3
+ export { default as fromDocumentToHash } from '#transmission/transmission/from-document-to-hash'
4
+ export { default as fromHashToDocument } from '#transmission/transmission/from-hash-to-document'
5
+ export { default as toZashiki } from '#transmission/transmission/to-zashiki'
6
+ }
7
+
8
+ declare module 'shinkansen-transmission/transmission' {
9
+ export * from '#transmission/transmission'
10
+ }
@@ -1,4 +1,4 @@
1
- declare module 'shinkansen-transmission/transmission/to-zashiki' {
1
+ declare module '#transmission/transmission/to-zashiki' {
2
2
  type SchemaType = Zashiki.SchemaType
3
3
 
4
4
  type ObjectLiteralType = Zashiki.ObjectLiteralType
@@ -8,3 +8,8 @@ declare module 'shinkansen-transmission/transmission/to-zashiki' {
8
8
 
9
9
  export default function toZashiki (rootSchema: SchemaType | undefined, values: ObjectType | ObjectLiteralType | undefined, params: ObjectType | ObjectLiteralType | undefined): ZashikiType | undefined
10
10
  }
11
+
12
+ declare module 'shinkansen-transmission/transmission/to-zashiki' {
13
+ export { default } from '#transmission/transmission/to-zashiki'
14
+ export * from '#transmission/transmission/to-zashiki'
15
+ }
@@ -21,7 +21,7 @@ import {
21
21
  getElementsFieldPropsForAnyOf,
22
22
  getElementsFieldPropsForOneOf,
23
23
  getElementsFieldPropsForAllOf
24
- } from 'shinkansen-transmission/transmission/common'
24
+ } from '#transmission/transmission/common'
25
25
 
26
26
  import {
27
27
  mapTransformStringByIndex,
@@ -52,7 +52,7 @@ import {
52
52
  getElementsFieldPropsForAllOf,
53
53
  getElementsFieldProps,
54
54
  getElementsFieldValue
55
- } from 'shinkansen-transmission/transmission/common'
55
+ } from '#transmission/transmission/common'
56
56
 
57
57
  const log = debug('shinkansen-transmission/to-zashiki/schema')
58
58
 
package/tsconfig.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "module": "NodeNext",
4
- "target": "ESNext",
5
- "moduleResolution": "NodeNext",
6
- "noEmit": true,
7
- "strict": true,
8
- "isolatedModules": true,
9
- "baseUrl": "."
10
- }
11
- }