@travetto/doc 5.0.13 → 5.0.15

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 ArcSine Technologies
3
+ Copyright (c) 2020 ArcSine Technologies
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/doc",
3
- "version": "5.0.13",
3
+ "version": "5.0.15",
4
4
  "description": "Documentation support for the Travetto framework",
5
5
  "keywords": [
6
6
  "docs",
@@ -24,12 +24,12 @@
24
24
  "directory": "module/doc"
25
25
  },
26
26
  "dependencies": {
27
- "@travetto/runtime": "^5.0.12",
27
+ "@travetto/runtime": "^5.0.14",
28
28
  "@types/prismjs": "^1.26.5",
29
29
  "prismjs": "^1.29.0"
30
30
  },
31
31
  "peerDependencies": {
32
- "@travetto/cli": "^5.0.15"
32
+ "@travetto/cli": "^5.0.17"
33
33
  },
34
34
  "peerDependenciesMeta": {
35
35
  "@travetto/cli": {
package/src/util/file.ts CHANGED
@@ -3,8 +3,8 @@ import path from 'node:path';
3
3
 
4
4
  import { Runtime, RuntimeIndex } from '@travetto/runtime';
5
5
 
6
- const ESLINT_PATTERN = /\s*\/\/ eslint.*$/g;
7
- const ENV_KEY = /Env.([^.]+)[.]key/g;
6
+ const ESLINT_PATTERN = /\s{0,10}\/\/ eslint.{0,300}$/g;
7
+ const ENV_KEY = /Env.([^.]{1,100})[.]key/g;
8
8
 
9
9
  /**
10
10
  * Standard file utilities
@@ -113,15 +113,15 @@ export class DocFileUtil {
113
113
  let methodPrefix = '';
114
114
  code = code.split(/\n/).map((x) => {
115
115
  if (!methodPrefix) {
116
- const info = x.match(/^(\s+)(?:(private|public)\s+)?(?:static\s+)?(?:async\s+)?(?:[*]\s*)?(?:(?:get|set)\s+)?(\S+)[<(](.*)/);
116
+ const info = x.match(/^(\s{0,50})(?:(private|public)\s{1,10})?(?:static\s{1,10})?(?:async\s{1,10})?(?:[*]\s{0,10})?(?:(?:get|set)\s{1,10})?(\S{1,200})[<(](.{0,500})/);
117
117
  if (info) {
118
118
  const [, space, __name, rest] = info;
119
119
  if (!rest.endsWith(';')) {
120
- if (/\s*[{]\s*return.*$/.test(x)) {
121
- return x.replace(/\s*[{]\s*return.*$/, ';');
120
+ if (/\s{0,50}[{]\s{0,50}return.{0,200}$/.test(x)) {
121
+ return x.replace(/\s{0,50}[{]\s{0,50}return.{0,200}$/, ';');
122
122
  } else {
123
123
  methodPrefix = space;
124
- return x.replace(/\s*[{]\s*$/, ';');
124
+ return x.replace(/\s{0,50}[{]\s{0,50}$/, ';');
125
125
  }
126
126
  }
127
127
  }