@travetto/doc 4.1.0 → 5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/doc",
3
- "version": "4.1.0",
3
+ "version": "5.0.0-rc.0",
4
4
  "description": "Documentation support for the Travetto framework",
5
5
  "keywords": [
6
6
  "docs",
@@ -24,13 +24,12 @@
24
24
  "directory": "module/doc"
25
25
  },
26
26
  "dependencies": {
27
- "@travetto/base": "^4.1.0",
28
- "@travetto/terminal": "^4.1.0",
27
+ "@travetto/base": "^5.0.0-rc.0",
29
28
  "@types/prismjs": "^1.26.4",
30
29
  "prismjs": "^1.29.0"
31
30
  },
32
31
  "peerDependencies": {
33
- "@travetto/cli": "^4.1.0"
32
+ "@travetto/cli": "^5.0.0-rc.0"
34
33
  },
35
34
  "peerDependenciesMeta": {
36
35
  "@travetto/cli": {
@@ -66,6 +66,7 @@ export const LIB_MAPPING = {
66
66
  Fetch: { title: 'fetch', href: 'https://nodejs.org/api/globals.html#fetch' },
67
67
  ParcelWatcher: { title: '@parcel/watcher', href: 'https://www.npmjs.com/package/@parcel/watcher' },
68
68
  Preact: { title: 'preact', href: 'https://preactjs.com' },
69
+ NodeYaml: { title: 'yaml', href: 'https://github.com/eemeli/yaml' },
69
70
 
70
71
  // JWT
71
72
  JWT: { title: 'JWT', href: 'https://jwt.io/' },
@@ -215,6 +215,10 @@ export const MOD_MAPPING = {
215
215
  name: '@travetto/rest-session', folder: '@travetto/rest-session', displayName: 'REST Session',
216
216
  description: 'Session provider for the travetto rest module.'
217
217
  },
218
+ RestUpload: {
219
+ name: '@travetto/rest-upload', folder: '@travetto/rest-upload', displayName: 'Rest Upload Support',
220
+ description: 'Provides integration between the travetto asset and rest module.'
221
+ },
218
222
  Scaffold: {
219
223
  name: '@travetto/scaffold', folder: '@travetto/scaffold', displayName: 'App Scaffold',
220
224
  description: 'App Scaffold for the Travetto framework'
@@ -246,9 +250,5 @@ export const MOD_MAPPING = {
246
250
  Worker: {
247
251
  name: '@travetto/worker', folder: '@travetto/worker', displayName: 'Worker',
248
252
  description: 'Process management utilities, with a focus on inter-process communication'
249
- },
250
- Yaml: {
251
- name: '@travetto/yaml', folder: '@travetto/yaml', displayName: 'YAML',
252
- description: 'Simple YAML support, provides only clean subset of yaml'
253
253
  }
254
254
  };
@@ -1,6 +1,6 @@
1
1
  import { createElement, JSXRuntimeTag } from '@travetto/doc/jsx-runtime';
2
2
 
3
- import { PackageUtil, path, RuntimeIndex } from '@travetto/manifest';
3
+ import { path, PackageUtil, RuntimeIndex } from '@travetto/manifest';
4
4
 
5
5
  import { JSXElementByFn, c } from '../jsx';
6
6
  import { DocResolveUtil, ResolvedCode, ResolvedRef, ResolvedSnippetLink } from '../util/resolve';
@@ -1,5 +1,6 @@
1
- import { ManifestContext, PackageUtil, path, RuntimeIndex } from '@travetto/manifest';
1
+ import path from 'node:path';
2
2
 
3
+ import { ManifestContext, PackageUtil, RuntimeIndex } from '@travetto/manifest';
3
4
  import { isJSXElement, JSXElement, JSXFragmentType } from '@travetto/doc/jsx-runtime';
4
5
 
5
6
  import { EMPTY_ELEMENT, getComponentName, JSXElementByFn, c } from '../jsx';
package/src/util/file.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import fs from 'node:fs/promises';
2
+ import path from 'node:path';
2
3
 
3
- import { ManifestModuleUtil, path, RuntimeIndex } from '@travetto/manifest';
4
+ import { ManifestModuleUtil, RuntimeIndex } from '@travetto/manifest';
4
5
 
5
6
  const ESLINT_PATTERN = /\s*\/\/ eslint.*$/g;
6
7
  const ENV_KEY = /Env.([^.]+)[.]key/g;
package/src/util/run.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import os from 'node:os';
2
+ import util from 'node:util';
2
3
  import { spawn, ChildProcess } from 'node:child_process';
3
4
 
4
5
  import { path, RuntimeIndex, RuntimeContext } from '@travetto/manifest';
5
6
  import { Env, ExecUtil } from '@travetto/base';
6
- import { StyleUtil } from '@travetto/terminal';
7
7
 
8
8
  export const COMMON_DATE = new Date('2029-03-14T00:00:00.000').getTime();
9
9
 
@@ -50,7 +50,7 @@ export class DocRunUtil {
50
50
  */
51
51
  static cleanRunOutput(text: string, cfg: RunConfig): string {
52
52
  const cwd = path.toPosix((cfg.module ? RuntimeIndex.getModule(cfg.module)! : RuntimeIndex.mainModule).sourcePath);
53
- text = StyleUtil.cleanText(text.trim())
53
+ text = util.stripVTControlCharacters(text.trim())
54
54
  .replaceAll(cwd, '.')
55
55
  .replaceAll(os.tmpdir(), '/tmp')
56
56
  .replaceAll(RuntimeContext.workspace.path, '<workspace-root>')
@@ -104,7 +104,7 @@ export class DocRunUtil {
104
104
  if (!res.valid) {
105
105
  throw new Error(res.stderr);
106
106
  }
107
- final = StyleUtil.cleanText(res.stdout).trim() || StyleUtil.cleanText(res.stderr).trim();
107
+ final = util.stripVTControlCharacters(res.stdout).trim() || util.stripVTControlCharacters(res.stderr).trim();
108
108
  } catch (err) {
109
109
  if (err instanceof Error) {
110
110
  final = err.message;
@@ -1,7 +1,8 @@
1
1
  import fs from 'node:fs/promises';
2
2
  import { spawn } from 'node:child_process';
3
+ import path from 'node:path';
3
4
 
4
- import { PackageUtil, path, RuntimeIndex, RuntimeContext } from '@travetto/manifest';
5
+ import { PackageUtil, RuntimeIndex, RuntimeContext } from '@travetto/manifest';
5
6
  import { ExecUtil, Env, watchCompiler } from '@travetto/base';
6
7
  import { CliCommandShape, CliCommand, CliValidationError, CliUtil } from '@travetto/cli';
7
8
  import { MinLength } from '@travetto/schema';