@servable/tools 1.6.2 → 1.6.4
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/package.json +2 -2
- package/src/document/1.0.0/all/write/index.js +2 -2
- package/src/document/1.0.0/all/write/protocol/index.js +1 -1
- package/src/document/1.0.0/all/write/utils/chunk.js +1 -1
- package/src/document/1.1.0/all/write/index.js +2 -2
- package/src/document/1.1.0/all/write/protocol/index.js +1 -1
- package/src/document/1.1.0/all/write/utils/chunk.js +1 -1
- package/src/domain/protocolLoader/base.js +1 -1
- package/src/manifest/access/index.js +1 -1
- package/src/manifest/extract/route/extractFileWithVariants.js +1 -1
- package/src/manifest/extract/route/extractFiles.js +1 -1
- package/src/manifest/extract/route/index.js +1 -1
- /package/src/lib/{sanitizePath.js → sanitize.js} +0 -0
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"type": "module",
|
|
4
4
|
"source": "src/index.js",
|
|
5
5
|
"main": "src/index.js",
|
|
6
|
-
"version": "1.6.
|
|
6
|
+
"version": "1.6.4",
|
|
7
7
|
"description": "Servable tools is a utility that builds a protocol's manifest and documents it.",
|
|
8
8
|
"author": "Servable Community",
|
|
9
9
|
"license": "ISC",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"json2md": "^2.0.0",
|
|
79
79
|
"mime": "^4.0.0",
|
|
80
80
|
"parse-comments": "^1.0.0",
|
|
81
|
-
"path-sanitizer": "^
|
|
81
|
+
"path-sanitizer": "^3.1.0",
|
|
82
82
|
"semver": "^7.5.4",
|
|
83
83
|
"jimp": "^1.6.0",
|
|
84
84
|
"underscore": "^1.13.3"
|
|
@@ -3,8 +3,8 @@ import fs from 'fs'
|
|
|
3
3
|
|
|
4
4
|
export default async ({ payload, path }) => {
|
|
5
5
|
const { path, protocol, classes } = payload
|
|
6
|
-
const rootPath = sanitizePath(`${path}/generated`)
|
|
6
|
+
const rootPath = sanitizePath.default(`${path}/generated`)
|
|
7
7
|
|
|
8
|
-
const protocolPath = sanitizePath(`${rootPath}/index.md`)
|
|
8
|
+
const protocolPath = sanitizePath.default(`${rootPath}/index.md`)
|
|
9
9
|
fs.promises.writeFile(protocolPath, protocol)
|
|
10
10
|
}
|
|
@@ -12,7 +12,7 @@ export default async ({ item, path, includeAuxiliary }) => {
|
|
|
12
12
|
classes,
|
|
13
13
|
} = item
|
|
14
14
|
|
|
15
|
-
const rootPath = sanitizePath(`${path}/documentation/generated`)
|
|
15
|
+
const rootPath = sanitizePath.default(`${path}/documentation/generated`)
|
|
16
16
|
|
|
17
17
|
if ((await checkFileExists(rootPath))) {
|
|
18
18
|
await fse.emptyDir(rootPath)
|
|
@@ -10,7 +10,7 @@ export default async ({ chunk, path, includeAuxiliary }) => {
|
|
|
10
10
|
auxiliary
|
|
11
11
|
} = chunk
|
|
12
12
|
|
|
13
|
-
const chunkPath = `/${sanitizePath(`${path}/${id}.md`)}`
|
|
13
|
+
const chunkPath = `/${sanitizePath.default(`${path}/${id}.md`)}`
|
|
14
14
|
let text = json2md([{ h1: name }, ...payload])
|
|
15
15
|
if (includeAuxiliary && auxiliary) {
|
|
16
16
|
text = `${text}\n${auxiliary}`
|
|
@@ -3,8 +3,8 @@ import fs from 'fs'
|
|
|
3
3
|
|
|
4
4
|
export default async ({ payload, path }) => {
|
|
5
5
|
const { path, protocol, classes } = payload
|
|
6
|
-
const rootPath = sanitizePath(`${path}/generated`)
|
|
6
|
+
const rootPath = sanitizePath.default(`${path}/generated`)
|
|
7
7
|
|
|
8
|
-
const protocolPath = sanitizePath(`${rootPath}/index.md`)
|
|
8
|
+
const protocolPath = sanitizePath.default(`${rootPath}/index.md`)
|
|
9
9
|
fs.promises.writeFile(protocolPath, protocol)
|
|
10
10
|
}
|
|
@@ -12,7 +12,7 @@ export default async ({ item, path, includeAuxiliary }) => {
|
|
|
12
12
|
classes,
|
|
13
13
|
} = item
|
|
14
14
|
|
|
15
|
-
const rootPath = sanitizePath(`${path}/documentation/generated`)
|
|
15
|
+
const rootPath = sanitizePath.default(`${path}/documentation/generated`)
|
|
16
16
|
|
|
17
17
|
if ((await checkFileExists(rootPath))) {
|
|
18
18
|
await fse.emptyDir(rootPath)
|
|
@@ -10,7 +10,7 @@ export default async ({ chunk, path, includeAuxiliary }) => {
|
|
|
10
10
|
auxiliary
|
|
11
11
|
} = chunk
|
|
12
12
|
|
|
13
|
-
const chunkPath = `/${sanitizePath(`${path}/${id}.md`)}`
|
|
13
|
+
const chunkPath = `/${sanitizePath.default(`${path}/${id}.md`)}`
|
|
14
14
|
let text = json2md([{ h1: name }, ...payload])
|
|
15
15
|
if (includeAuxiliary && auxiliary) {
|
|
16
16
|
text = `${text}\n${auxiliary}`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import extract from '../../manifest/extract/index.js'
|
|
2
2
|
import { DataTemplateType, ProtocolEnum } from '../../manifest/data/1.0.0/enums.js'
|
|
3
|
-
import sanitizePath from '../../lib/
|
|
3
|
+
import sanitizePath from '../../lib/sanitize.js'
|
|
4
4
|
import importJSDefault from './lib/importJSDefault.js'
|
|
5
5
|
import importJSONDefault from './lib/importJSONDefault.js'
|
|
6
6
|
import access from '../../manifest/access/index.js'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import extract from '../extract/index.js'
|
|
2
2
|
import accessChildInTreeWithRoute from './accessChildInTreeWithRoute.js'
|
|
3
|
-
import sanitizePath from '../../lib/
|
|
3
|
+
import sanitizePath from '../../lib/sanitize.js'
|
|
4
4
|
import { DataTemplateType } from '../data/1.0.0/enums.js'
|
|
5
5
|
|
|
6
6
|
export default async ({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import checkFileExists from "../../../lib/checkFileExists.js"
|
|
2
2
|
import importJSONAsync from "../../../lib/importJSONAsync.js"
|
|
3
|
-
import sanitizePath from '../../../lib/
|
|
3
|
+
import sanitizePath from '../../../lib/sanitize.js'
|
|
4
4
|
import fs from "fs"
|
|
5
5
|
import fse from 'fs-extra'
|
|
6
6
|
import imageToBase64 from './imageToBase64.js'
|
|
@@ -3,7 +3,7 @@ import directoryFilesRecursive from '../../../lib/directoryFilesRecursive.js'
|
|
|
3
3
|
import formatFile from '../formatFile.js'
|
|
4
4
|
import foldersInFolder from '../../../lib/foldersInFolder.js'
|
|
5
5
|
import extractFiles from './extractFiles.js'
|
|
6
|
-
import sanitizePath from '../../../lib/
|
|
6
|
+
import sanitizePath from '../../../lib/sanitize.js'
|
|
7
7
|
|
|
8
8
|
export default async (props) => {
|
|
9
9
|
const { item, route, parentLeafPath } = props
|
|
File without changes
|