touch-all 0.0.1 → 1.1.7
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 +12 -15
- package/dist/bundled/touch-all.js +26790 -52613
- package/dist/lib/_commonErrors.d.ts +18 -0
- package/dist/lib/_commonTypes.d.ts +5 -0
- package/dist/lib/cli.d.ts +2 -0
- package/dist/lib/fsGenerator.d.ts +4 -0
- package/dist/lib/fsNormalizator.d.ts +10 -0
- package/dist/lib/index.d.ts +6 -45
- package/dist/lib/index.js +81 -85
- package/dist/lib/parser.d.ts +2 -0
- package/dist/lib/touch-all.d.ts +1 -0
- package/dist/slim/touch-all.js +79 -86
- package/package.json +9 -4
package/README.md
CHANGED
|
@@ -102,14 +102,14 @@ my-project/
|
|
|
102
102
|
|
|
103
103
|
### Rules
|
|
104
104
|
|
|
105
|
-
| Syntax
|
|
106
|
-
|
|
107
|
-
| `name/`
|
|
108
|
-
| `name`
|
|
109
|
-
| `dir/sub/`
|
|
110
|
-
| `dir/sub/file.ts` | file at an explicit subpath
|
|
111
|
-
| `# comment`
|
|
112
|
-
| `// comment`
|
|
105
|
+
| Syntax | Meaning |
|
|
106
|
+
| ----------------- | -------------------------------- |
|
|
107
|
+
| `name/` | directory |
|
|
108
|
+
| `name` | file |
|
|
109
|
+
| `dir/sub/` | directory at an explicit subpath |
|
|
110
|
+
| `dir/sub/file.ts` | file at an explicit subpath |
|
|
111
|
+
| `# comment` | ignored (stripped) |
|
|
112
|
+
| `// comment` | ignored (stripped) |
|
|
113
113
|
|
|
114
114
|
Items at the root level (no indentation / no parent) are created directly inside the target directory.
|
|
115
115
|
|
|
@@ -153,10 +153,7 @@ import { NodeContext, NodeRuntime } from '@effect/platform-node'
|
|
|
153
153
|
|
|
154
154
|
const items = parserFolderStructure(tree)
|
|
155
155
|
|
|
156
|
-
fileStructureCreator(items, '/absolute/target/path').pipe(
|
|
157
|
-
Effect.provide(NodeContext.layer),
|
|
158
|
-
NodeRuntime.runMain,
|
|
159
|
-
)
|
|
156
|
+
fileStructureCreator(items, '/absolute/target/path').pipe(Effect.provide(NodeContext.layer), NodeRuntime.runMain)
|
|
160
157
|
```
|
|
161
158
|
|
|
162
159
|
### `resolveProjectPathToBase(projectPath: string, basePath: string): Effect<string, PathTraversalError>`
|
|
@@ -165,10 +162,10 @@ Resolves `projectPath` relative to `basePath` and rejects any path that would es
|
|
|
165
162
|
|
|
166
163
|
### Error types
|
|
167
164
|
|
|
168
|
-
| Class
|
|
169
|
-
|
|
165
|
+
| Class | `_tag` | When thrown |
|
|
166
|
+
| -------------------- | ---------------------- | --------------------------------------------------------------- |
|
|
170
167
|
| `PathTraversalError` | `'PathTraversalError'` | Resolved path escapes `basePath`, or `basePath` is not absolute |
|
|
171
|
-
| `FsError`
|
|
168
|
+
| `FsError` | `'FsError'` | `mkdirSync` or `writeFileSync` fails |
|
|
172
169
|
|
|
173
170
|
## License
|
|
174
171
|
|