@smithy/service-client-documentation-generator 2.2.0 → 4.0.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.
Files changed (2) hide show
  1. package/dist-cjs/index.js +9 -13
  2. package/package.json +8 -5
package/dist-cjs/index.js CHANGED
@@ -40,13 +40,10 @@ var import_typedoc = require("typedoc");
40
40
 
41
41
  // src/utils.ts
42
42
  var import_path = require("path");
43
- var isClientModel = /* @__PURE__ */ __name((model) => {
44
- var _a, _b;
45
- return (_b = (_a = model == null ? void 0 : model.sources) == null ? void 0 : _a[0]) == null ? void 0 : _b.fullFileName.includes(`${import_path.sep}clients${import_path.sep}`);
46
- }, "isClientModel");
43
+ var isClientModel = /* @__PURE__ */ __name((model) => model?.sources?.[0]?.fullFileName.includes(`${import_path.sep}clients${import_path.sep}`), "isClientModel");
47
44
 
48
45
  // src/sdk-client-toc-plugin.ts
49
- var _SdkClientTocPlugin = class _SdkClientTocPlugin {
46
+ var SdkClientTocPlugin = class {
50
47
  constructor(options, logger, renderer) {
51
48
  this.options = options;
52
49
  this.logger = logger;
@@ -57,11 +54,10 @@ var _SdkClientTocPlugin = class _SdkClientTocPlugin {
57
54
  });
58
55
  };
59
56
  this.onEndResolve = (context) => {
60
- var _a;
61
57
  if (!this.clientDir)
62
58
  this.clientDir = this.loadClientDir(context.project);
63
59
  for (const model of Object.values(context.project.reflections)) {
64
- const isEffectiveParent = model instanceof import_typedoc.ContainerReflection && ((_a = model.children) == null ? void 0 : _a.length) || model.isProject();
60
+ const isEffectiveParent = model instanceof import_typedoc.ContainerReflection && model.children?.length || model.isProject();
65
61
  if (!isEffectiveParent || model.kindOf(import_typedoc.ReflectionKind.SomeModule)) {
66
62
  return;
67
63
  }
@@ -83,10 +79,12 @@ var _SdkClientTocPlugin = class _SdkClientTocPlugin {
83
79
  this.renderer.application.converter.on(import_typedoc.Converter.EVENT_END, this.changeLinksToLowerCase);
84
80
  this.renderer.application.converter.on(import_typedoc.Converter.EVENT_RESOLVE_END, this.onEndResolve);
85
81
  }
82
+ static {
83
+ __name(this, "SdkClientTocPlugin");
84
+ }
86
85
  // Confirm declaration comes from the same folder as the client class
87
86
  belongsToClientPackage(model) {
88
- var _a;
89
- return this.clientDir && ((_a = model.sources) == null ? void 0 : _a[0].fullFileName.indexOf(this.clientDir)) === 0;
87
+ return this.clientDir && model.sources?.[0].fullFileName.indexOf(this.clientDir) === 0;
90
88
  }
91
89
  isClient(model) {
92
90
  const { extendedTypes = [] } = model;
@@ -157,14 +155,12 @@ var _SdkClientTocPlugin = class _SdkClientTocPlugin {
157
155
  return (0, import_path.dirname)((0, import_path.dirname)(fullFileName));
158
156
  }
159
157
  };
160
- __name(_SdkClientTocPlugin, "SdkClientTocPlugin");
161
158
  __decorateClass([
162
159
  (0, import_typedoc.BindOption)("defaultGroup")
163
- ], _SdkClientTocPlugin.prototype, "defaultGroup", 2);
160
+ ], SdkClientTocPlugin.prototype, "defaultGroup", 2);
164
161
  __decorateClass([
165
162
  (0, import_typedoc.BindOption)("defaultCategory")
166
- ], _SdkClientTocPlugin.prototype, "defaultCategory", 2);
167
- var SdkClientTocPlugin = _SdkClientTocPlugin;
163
+ ], SdkClientTocPlugin.prototype, "defaultCategory", 2);
168
164
 
169
165
  // src/index.ts
170
166
  function load(app) {
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@smithy/service-client-documentation-generator",
3
- "version": "2.2.0",
3
+ "version": "4.0.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline service-client-documentation-generator",
7
7
  "build:es": "yarn g:tsc -p tsconfig.es.json",
8
8
  "build:types": "yarn g:tsc -p tsconfig.types.json",
9
- "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
9
+ "build:types:downlevel": "rimraf dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
10
10
  "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
11
11
  "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0",
12
12
  "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
@@ -25,11 +25,11 @@
25
25
  "typedocplugin"
26
26
  ],
27
27
  "dependencies": {
28
- "tslib": "^2.6.2"
28
+ "tslib": "^2.6.2",
29
+ "typedoc": "0.23.23"
29
30
  },
30
31
  "devDependencies": {
31
- "@tsconfig/recommended": "1.0.1",
32
- "@types/node": "^14.14.31",
32
+ "@types/node": "^18.11.9",
33
33
  "concurrently": "7.0.0",
34
34
  "downlevel-dts": "0.10.1",
35
35
  "rimraf": "3.0.2"
@@ -55,5 +55,8 @@
55
55
  },
56
56
  "publishConfig": {
57
57
  "directory": ".release/package"
58
+ },
59
+ "engines": {
60
+ "node": ">=18.0.0"
58
61
  }
59
62
  }