@trustify-da/trustify-da-javascript-client 0.3.0-ea.0e9ba23 → 0.3.0-ea.1d590b2

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 (66) hide show
  1. package/README.md +179 -11
  2. package/dist/package.json +12 -3
  3. package/dist/src/analysis.d.ts +16 -0
  4. package/dist/src/analysis.js +53 -4
  5. package/dist/src/batch_opts.d.ts +24 -0
  6. package/dist/src/batch_opts.js +35 -0
  7. package/dist/src/cli.js +171 -4
  8. package/dist/src/cyclone_dx_sbom.d.ts +14 -1
  9. package/dist/src/cyclone_dx_sbom.js +34 -6
  10. package/dist/src/index.d.ts +132 -2
  11. package/dist/src/index.js +334 -5
  12. package/dist/src/license/index.d.ts +2 -2
  13. package/dist/src/license/index.js +4 -4
  14. package/dist/src/license/license_utils.d.ts +40 -0
  15. package/dist/src/license/license_utils.js +134 -0
  16. package/dist/src/license/licenses_api.js +9 -2
  17. package/dist/src/license/project_license.d.ts +1 -6
  18. package/dist/src/license/project_license.js +4 -81
  19. package/dist/src/oci_image/utils.js +11 -2
  20. package/dist/src/provider.d.ts +6 -3
  21. package/dist/src/provider.js +14 -5
  22. package/dist/src/providers/base_java.d.ts +0 -9
  23. package/dist/src/providers/base_java.js +2 -38
  24. package/dist/src/providers/base_javascript.d.ts +19 -3
  25. package/dist/src/providers/base_javascript.js +106 -23
  26. package/dist/src/providers/base_pyproject.d.ts +153 -0
  27. package/dist/src/providers/base_pyproject.js +315 -0
  28. package/dist/src/providers/golang_gomodules.d.ts +12 -12
  29. package/dist/src/providers/golang_gomodules.js +102 -112
  30. package/dist/src/providers/gomod_parser.d.ts +4 -0
  31. package/dist/src/providers/gomod_parser.js +16 -0
  32. package/dist/src/providers/java_gradle.d.ts +19 -0
  33. package/dist/src/providers/java_gradle.js +116 -1
  34. package/dist/src/providers/java_maven.d.ts +9 -1
  35. package/dist/src/providers/java_maven.js +103 -10
  36. package/dist/src/providers/javascript_npm.d.ts +1 -0
  37. package/dist/src/providers/javascript_npm.js +21 -0
  38. package/dist/src/providers/javascript_pnpm.d.ts +1 -1
  39. package/dist/src/providers/javascript_pnpm.js +8 -4
  40. package/dist/src/providers/manifest.d.ts +2 -0
  41. package/dist/src/providers/manifest.js +22 -4
  42. package/dist/src/providers/processors/yarn_berry_processor.js +88 -5
  43. package/dist/src/providers/python_controller.d.ts +5 -1
  44. package/dist/src/providers/python_controller.js +8 -4
  45. package/dist/src/providers/python_pip.d.ts +4 -0
  46. package/dist/src/providers/python_pip.js +7 -6
  47. package/dist/src/providers/python_pip_pyproject.d.ts +61 -0
  48. package/dist/src/providers/python_pip_pyproject.js +144 -0
  49. package/dist/src/providers/python_poetry.d.ts +58 -0
  50. package/dist/src/providers/python_poetry.js +175 -0
  51. package/dist/src/providers/python_uv.d.ts +42 -0
  52. package/dist/src/providers/python_uv.js +149 -0
  53. package/dist/src/providers/requirements_parser.js +5 -8
  54. package/dist/src/providers/rust_cargo.d.ts +52 -0
  55. package/dist/src/providers/rust_cargo.js +614 -0
  56. package/dist/src/providers/tree-sitter-gomod.wasm +0 -0
  57. package/dist/src/providers/tree-sitter-requirements.wasm +0 -0
  58. package/dist/src/sbom.d.ts +14 -1
  59. package/dist/src/sbom.js +13 -2
  60. package/dist/src/tools.d.ts +26 -0
  61. package/dist/src/tools.js +58 -0
  62. package/dist/src/workspace.d.ts +61 -0
  63. package/dist/src/workspace.js +256 -0
  64. package/package.json +13 -4
  65. package/dist/src/license/compatibility.d.ts +0 -18
  66. package/dist/src/license/compatibility.js +0 -45
@@ -0,0 +1,153 @@
1
+ /** @typedef {{name: string, version: string, children: string[], hashes?: Array<{alg: string, content: string}>}} GraphEntry */
2
+ /** @typedef {{name: string, version: string, dependencies: DepTreeEntry[]}} DepTreeEntry */
3
+ /** @typedef {{directDeps: string[], graph: Map<string, GraphEntry>}} DependencyData */
4
+ /** @typedef {{ecosystem: string, content: string, contentType: string}} Provided */
5
+ export default class Base_pyproject {
6
+ /**
7
+ * @param {string} manifestName
8
+ * @returns {boolean}
9
+ */
10
+ isSupported(manifestName: string): boolean;
11
+ /**
12
+ * @param {string} manifestDir
13
+ * @param {Object} [opts={}]
14
+ * @returns {boolean}
15
+ */
16
+ validateLockFile(manifestDir: string, opts?: any): boolean;
17
+ /**
18
+ * Walk up from manifestDir to find the directory containing the lock file.
19
+ * Follows the same pattern as Base_javascript._findLockFileDir().
20
+ * @param {string} manifestDir
21
+ * @param {Object} [opts={}]
22
+ * @returns {string|null}
23
+ * @protected
24
+ */
25
+ protected _findLockFileDir(manifestDir: string, opts?: any): string | null;
26
+ /**
27
+ * Detect workspace root boundaries.
28
+ * Currently only uv has native workspace support ([tool.uv.workspace] in pyproject.toml).
29
+ * Poetry has no workspace/monorepo support (python-poetry/poetry#2270), so each
30
+ * poetry project is treated independently — see Python_poetry._findLockFileDir().
31
+ * @param {string} dir
32
+ * @returns {boolean}
33
+ * @protected
34
+ */
35
+ protected _isWorkspaceRoot(dir: string): boolean;
36
+ /**
37
+ * Read project license from pyproject.toml, with fallback to LICENSE file.
38
+ * @param {string} manifestPath
39
+ * @returns {string|null}
40
+ */
41
+ readLicenseFromManifest(manifestPath: string): string | null;
42
+ /**
43
+ * @param {string} manifest - path to pyproject.toml
44
+ * @param {Object} [opts={}]
45
+ * @returns {Promise<Provided>}
46
+ */
47
+ provideStack(manifest: string, opts?: any): Promise<Provided>;
48
+ /**
49
+ * @param {string} manifest - path to pyproject.toml
50
+ * @param {Object} [opts={}]
51
+ * @returns {Promise<Provided>}
52
+ */
53
+ provideComponent(manifest: string, opts?: any): Promise<Provided>;
54
+ /**
55
+ * @returns {string}
56
+ * @protected
57
+ */
58
+ protected _lockFileName(): string;
59
+ /**
60
+ * @returns {string}
61
+ * @protected
62
+ */
63
+ protected _cmdName(): string;
64
+ /**
65
+ * Resolve dependencies using the tool-specific command and parser.
66
+ *
67
+ * @param {string} manifestDir - directory containing the target pyproject.toml
68
+ * @param {string} workspaceDir - workspace root (where the lock file lives);
69
+ * only used by providers that need workspace-level resolution (e.g. uv)
70
+ * @param {object} parsed - parsed pyproject.toml
71
+ * @param {Object} opts
72
+ * @returns {Promise<DependencyData>}
73
+ * @protected
74
+ */
75
+ protected _getDependencyData(manifestDir: string, workspaceDir: string, parsed: object, opts: any): Promise<DependencyData>;
76
+ /**
77
+ * Canonicalize a Python package name per PEP 503.
78
+ * @param {string} name
79
+ * @returns {string}
80
+ * @protected
81
+ */
82
+ protected _canonicalize(name: string): string;
83
+ /**
84
+ * Get the project name from pyproject.toml.
85
+ * @param {object} parsed
86
+ * @returns {string|null}
87
+ * @protected
88
+ */
89
+ protected _getProjectName(parsed: object): string | null;
90
+ /**
91
+ * Get the project version from pyproject.toml.
92
+ * @param {object} parsed
93
+ * @returns {string|null}
94
+ * @protected
95
+ */
96
+ protected _getProjectVersion(parsed: object): string | null;
97
+ /**
98
+ * Scan raw pyproject.toml text for dependencies with ignore markers.
99
+ * @param {string} manifestPath
100
+ * @returns {Set<string>}
101
+ * @protected
102
+ */
103
+ protected _getIgnoredDeps(manifestPath: string): Set<string>;
104
+ /**
105
+ * Compute the set of graph nodes reachable from direct deps, excluding ignored.
106
+ * @param {Map<string, GraphEntry>} graph
107
+ * @param {string[]} directDeps
108
+ * @param {Set<string>} ignoredDeps
109
+ * @returns {Set<string>}
110
+ * @protected
111
+ */
112
+ protected _reachableNodes(graph: Map<string, GraphEntry>, directDeps: string[], ignoredDeps: Set<string>): Set<string>;
113
+ /**
114
+ * @param {string} name
115
+ * @param {string} version
116
+ * @returns {PackageURL}
117
+ * @protected
118
+ */
119
+ protected _toPurl(name: string, version: string): PackageURL;
120
+ /**
121
+ * Create SBOM json string for a pyproject.toml project.
122
+ * @param {string} manifest - path to pyproject.toml
123
+ * @param {Object} opts
124
+ * @param {boolean} includeTransitive
125
+ * @returns {Promise<string>}
126
+ * @private
127
+ */
128
+ private _createSbom;
129
+ }
130
+ export type GraphEntry = {
131
+ name: string;
132
+ version: string;
133
+ children: string[];
134
+ hashes?: Array<{
135
+ alg: string;
136
+ content: string;
137
+ }>;
138
+ };
139
+ export type DepTreeEntry = {
140
+ name: string;
141
+ version: string;
142
+ dependencies: DepTreeEntry[];
143
+ };
144
+ export type DependencyData = {
145
+ directDeps: string[];
146
+ graph: Map<string, GraphEntry>;
147
+ };
148
+ export type Provided = {
149
+ ecosystem: string;
150
+ content: string;
151
+ contentType: string;
152
+ };
153
+ import { PackageURL } from 'packageurl-js';
@@ -0,0 +1,315 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import { PackageURL } from 'packageurl-js';
4
+ import { parse as parseToml } from 'smol-toml';
5
+ import { getLicense } from '../license/license_utils.js';
6
+ import Sbom from '../sbom.js';
7
+ import { getCustom } from '../tools.js';
8
+ const ecosystem = 'pip';
9
+ const IGNORE_MARKERS = ['exhortignore', 'trustify-da-ignore'];
10
+ const NO_SCOPE = undefined;
11
+ const DEFAULT_ROOT_NAME = 'default-pip-root';
12
+ const DEFAULT_ROOT_VERSION = '0.0.0';
13
+ /** @typedef {{name: string, version: string, children: string[], hashes?: Array<{alg: string, content: string}>}} GraphEntry */
14
+ /** @typedef {{name: string, version: string, dependencies: DepTreeEntry[]}} DepTreeEntry */
15
+ /** @typedef {{directDeps: string[], graph: Map<string, GraphEntry>}} DependencyData */
16
+ /** @typedef {{ecosystem: string, content: string, contentType: string}} Provided */
17
+ export default class Base_pyproject {
18
+ /**
19
+ * @param {string} manifestName
20
+ * @returns {boolean}
21
+ */
22
+ isSupported(manifestName) {
23
+ return 'pyproject.toml' === manifestName;
24
+ }
25
+ /**
26
+ * @param {string} manifestDir
27
+ * @param {Object} [opts={}]
28
+ * @returns {boolean}
29
+ */
30
+ validateLockFile(manifestDir, opts = {}) {
31
+ return this._findLockFileDir(manifestDir, opts) != null;
32
+ }
33
+ /**
34
+ * Walk up from manifestDir to find the directory containing the lock file.
35
+ * Follows the same pattern as Base_javascript._findLockFileDir().
36
+ * @param {string} manifestDir
37
+ * @param {Object} [opts={}]
38
+ * @returns {string|null}
39
+ * @protected
40
+ */
41
+ _findLockFileDir(manifestDir, opts = {}) {
42
+ const workspaceDir = getCustom('TRUSTIFY_DA_WORKSPACE_DIR', null, opts);
43
+ if (workspaceDir) {
44
+ const dir = path.resolve(workspaceDir);
45
+ return fs.existsSync(path.join(dir, this._lockFileName())) ? dir : null;
46
+ }
47
+ let dir = path.resolve(manifestDir);
48
+ let parent = dir;
49
+ do {
50
+ dir = parent;
51
+ if (fs.existsSync(path.join(dir, this._lockFileName()))) {
52
+ return dir;
53
+ }
54
+ if (this._isWorkspaceRoot(dir)) {
55
+ return null;
56
+ }
57
+ parent = path.dirname(dir);
58
+ } while (parent !== dir);
59
+ return null;
60
+ }
61
+ /**
62
+ * Detect workspace root boundaries.
63
+ * Currently only uv has native workspace support ([tool.uv.workspace] in pyproject.toml).
64
+ * Poetry has no workspace/monorepo support (python-poetry/poetry#2270), so each
65
+ * poetry project is treated independently — see Python_poetry._findLockFileDir().
66
+ * @param {string} dir
67
+ * @returns {boolean}
68
+ * @protected
69
+ */
70
+ _isWorkspaceRoot(dir) {
71
+ const pyprojectPath = path.join(dir, 'pyproject.toml');
72
+ if (!fs.existsSync(pyprojectPath)) {
73
+ return false;
74
+ }
75
+ try {
76
+ const content = parseToml(fs.readFileSync(pyprojectPath, 'utf-8'));
77
+ if (content.tool?.uv?.workspace) {
78
+ return true;
79
+ }
80
+ }
81
+ catch (_) {
82
+ // ignore parse errors
83
+ }
84
+ return false;
85
+ }
86
+ /**
87
+ * Read project license from pyproject.toml, with fallback to LICENSE file.
88
+ * @param {string} manifestPath
89
+ * @returns {string|null}
90
+ */
91
+ readLicenseFromManifest(manifestPath) {
92
+ let fromManifest = null;
93
+ try {
94
+ let content = fs.readFileSync(manifestPath, 'utf-8');
95
+ let parsed = parseToml(content);
96
+ fromManifest = parsed.project?.license;
97
+ if (typeof fromManifest === 'object' && fromManifest != null) {
98
+ fromManifest = fromManifest.text || null;
99
+ }
100
+ if (!fromManifest) {
101
+ fromManifest = parsed.tool?.poetry?.license || null;
102
+ }
103
+ }
104
+ catch (_) {
105
+ // leave fromManifest as null
106
+ }
107
+ return getLicense(fromManifest, manifestPath);
108
+ }
109
+ /**
110
+ * @param {string} manifest - path to pyproject.toml
111
+ * @param {Object} [opts={}]
112
+ * @returns {Promise<Provided>}
113
+ */
114
+ async provideStack(manifest, opts = {}) {
115
+ return {
116
+ ecosystem,
117
+ content: await this._createSbom(manifest, opts, true),
118
+ contentType: 'application/vnd.cyclonedx+json'
119
+ };
120
+ }
121
+ /**
122
+ * @param {string} manifest - path to pyproject.toml
123
+ * @param {Object} [opts={}]
124
+ * @returns {Promise<Provided>}
125
+ */
126
+ async provideComponent(manifest, opts = {}) {
127
+ return {
128
+ ecosystem,
129
+ content: await this._createSbom(manifest, opts, false),
130
+ contentType: 'application/vnd.cyclonedx+json'
131
+ };
132
+ }
133
+ // --- abstract methods (subclasses must override) ---
134
+ /**
135
+ * @returns {string}
136
+ * @protected
137
+ */
138
+ _lockFileName() {
139
+ throw new TypeError('_lockFileName must be implemented');
140
+ }
141
+ /**
142
+ * @returns {string}
143
+ * @protected
144
+ */
145
+ _cmdName() {
146
+ throw new TypeError('_cmdName must be implemented');
147
+ }
148
+ /**
149
+ * Resolve dependencies using the tool-specific command and parser.
150
+ *
151
+ * @param {string} manifestDir - directory containing the target pyproject.toml
152
+ * @param {string} workspaceDir - workspace root (where the lock file lives);
153
+ * only used by providers that need workspace-level resolution (e.g. uv)
154
+ * @param {object} parsed - parsed pyproject.toml
155
+ * @param {Object} opts
156
+ * @returns {Promise<DependencyData>}
157
+ * @protected
158
+ */
159
+ // eslint-disable-next-line no-unused-vars
160
+ async _getDependencyData(manifestDir, workspaceDir, parsed, opts) {
161
+ throw new TypeError('_getDependencyData must be implemented');
162
+ }
163
+ // --- shared helpers ---
164
+ /**
165
+ * Canonicalize a Python package name per PEP 503.
166
+ * @param {string} name
167
+ * @returns {string}
168
+ * @protected
169
+ */
170
+ _canonicalize(name) {
171
+ return name.toLowerCase().replace(/[-_.]+/g, '-');
172
+ }
173
+ /**
174
+ * Get the project name from pyproject.toml.
175
+ * @param {object} parsed
176
+ * @returns {string|null}
177
+ * @protected
178
+ */
179
+ _getProjectName(parsed) {
180
+ return parsed.project?.name || parsed.tool?.poetry?.name || null;
181
+ }
182
+ /**
183
+ * Get the project version from pyproject.toml.
184
+ * @param {object} parsed
185
+ * @returns {string|null}
186
+ * @protected
187
+ */
188
+ _getProjectVersion(parsed) {
189
+ return parsed.project?.version || parsed.tool?.poetry?.version || null;
190
+ }
191
+ /**
192
+ * Scan raw pyproject.toml text for dependencies with ignore markers.
193
+ * @param {string} manifestPath
194
+ * @returns {Set<string>}
195
+ * @protected
196
+ */
197
+ _getIgnoredDeps(manifestPath) {
198
+ let ignored = new Set();
199
+ let content = fs.readFileSync(manifestPath, 'utf-8');
200
+ let lines = content.split(/\r?\n/);
201
+ for (let line of lines) {
202
+ if (!IGNORE_MARKERS.some(m => line.includes(m))) {
203
+ continue;
204
+ }
205
+ // PEP 621 style: "requests>=2.25" #exhortignore
206
+ let pep621Match = line.match(/^\s*"([^"]+)"/);
207
+ if (pep621Match) {
208
+ let reqStr = pep621Match[1];
209
+ let nameMatch = reqStr.match(/^([A-Za-z0-9]([A-Za-z0-9._-]*[A-Za-z0-9])?)/);
210
+ if (nameMatch) {
211
+ ignored.add(this._canonicalize(nameMatch[1]));
212
+ }
213
+ continue;
214
+ }
215
+ // Poetry style: requests = "^2.25" #exhortignore
216
+ let poetryMatch = line.match(/^\s*([A-Za-z0-9][A-Za-z0-9._-]*)\s*=/);
217
+ if (poetryMatch) {
218
+ ignored.add(this._canonicalize(poetryMatch[1]));
219
+ }
220
+ }
221
+ return ignored;
222
+ }
223
+ /**
224
+ * Compute the set of graph nodes reachable from direct deps, excluding ignored.
225
+ * @param {Map<string, GraphEntry>} graph
226
+ * @param {string[]} directDeps
227
+ * @param {Set<string>} ignoredDeps
228
+ * @returns {Set<string>}
229
+ * @protected
230
+ */
231
+ _reachableNodes(graph, directDeps, ignoredDeps) {
232
+ let reachable = new Set();
233
+ let queue = directDeps.filter(k => !ignoredDeps.has(k) && graph.has(k));
234
+ while (queue.length > 0) {
235
+ let key = queue.shift();
236
+ if (reachable.has(key)) {
237
+ continue;
238
+ }
239
+ reachable.add(key);
240
+ for (let child of graph.get(key).children) {
241
+ if (!ignoredDeps.has(child) && graph.has(child) && !reachable.has(child)) {
242
+ queue.push(child);
243
+ }
244
+ }
245
+ }
246
+ return reachable;
247
+ }
248
+ /**
249
+ * @param {string} name
250
+ * @param {string} version
251
+ * @returns {PackageURL}
252
+ * @protected
253
+ */
254
+ _toPurl(name, version) {
255
+ return new PackageURL('pypi', undefined, name, version, undefined, undefined);
256
+ }
257
+ /**
258
+ * Create SBOM json string for a pyproject.toml project.
259
+ * @param {string} manifest - path to pyproject.toml
260
+ * @param {Object} opts
261
+ * @param {boolean} includeTransitive
262
+ * @returns {Promise<string>}
263
+ * @private
264
+ */
265
+ async _createSbom(manifest, opts, includeTransitive) {
266
+ let manifestDir = path.dirname(manifest);
267
+ let content = fs.readFileSync(manifest, 'utf-8');
268
+ let parsed = parseToml(content);
269
+ let workspaceDir = this._findLockFileDir(manifestDir, opts) || manifestDir;
270
+ let { directDeps, graph } = await this._getDependencyData(manifestDir, workspaceDir, parsed, opts);
271
+ let ignoredDeps = this._getIgnoredDeps(manifest);
272
+ let sbom = new Sbom();
273
+ let rootName = this._getProjectName(parsed) || DEFAULT_ROOT_NAME;
274
+ let rootVersion = this._getProjectVersion(parsed) || DEFAULT_ROOT_VERSION;
275
+ let rootPurl = this._toPurl(rootName, rootVersion);
276
+ let license = this.readLicenseFromManifest(manifest);
277
+ sbom.addRoot(rootPurl, license);
278
+ if (includeTransitive) {
279
+ let reachable = this._reachableNodes(graph, directDeps, ignoredDeps);
280
+ for (let key of directDeps) {
281
+ if (!reachable.has(key)) {
282
+ continue;
283
+ }
284
+ let entry = graph.get(key);
285
+ sbom.addDependency(rootPurl, this._toPurl(entry.name, entry.version), NO_SCOPE, entry.hashes);
286
+ }
287
+ for (let [key, entry] of graph) {
288
+ if (!reachable.has(key)) {
289
+ continue;
290
+ }
291
+ let parentPurl = this._toPurl(entry.name, entry.version);
292
+ for (let child of entry.children) {
293
+ if (!reachable.has(child)) {
294
+ continue;
295
+ }
296
+ let childEntry = graph.get(child);
297
+ sbom.addDependency(parentPurl, this._toPurl(childEntry.name, childEntry.version), NO_SCOPE, childEntry.hashes);
298
+ }
299
+ }
300
+ }
301
+ else {
302
+ for (let key of directDeps) {
303
+ if (ignoredDeps.has(key)) {
304
+ continue;
305
+ }
306
+ let entry = graph.get(key);
307
+ if (!entry) {
308
+ continue;
309
+ }
310
+ sbom.addDependency(rootPurl, this._toPurl(entry.name, entry.version), NO_SCOPE, entry.hashes);
311
+ }
312
+ }
313
+ return sbom.getAsJsonString(opts);
314
+ }
315
+ }
@@ -19,31 +19,31 @@ export type Dependency = {
19
19
  ignore: boolean;
20
20
  };
21
21
  /**
22
- * @param {string} manifestName - the subject manifest name-type
23
- * @returns {boolean} - return true if `pom.xml` is the manifest name-type
22
+ * @param {string} manifestName the subject manifest name-type
23
+ * @returns {boolean} return true if `pom.xml` is the manifest name-type
24
24
  */
25
25
  declare function isSupported(manifestName: string): boolean;
26
26
  /**
27
- * @param {string} manifestDir - the directory where the manifest lies
27
+ * @param {string} manifestDir the directory where the manifest lies
28
28
  */
29
29
  declare function validateLockFile(): boolean;
30
30
  /**
31
31
  * Provide content and content type for maven-maven component analysis.
32
- * @param {string} manifest - path to go.mod for component report
33
- * @param {{}} [opts={}] - optional various options to pass along the application
34
- * @returns {Provided}
32
+ * @param {string} manifest path to go.mod for component report
33
+ * @param {{}} [opts={}] optional various options to pass along the application
34
+ * @returns {Promise<Provided>}
35
35
  */
36
- declare function provideComponent(manifest: string, opts?: {}): Provided;
36
+ declare function provideComponent(manifest: string, opts?: {}): Promise<Provided>;
37
37
  /**
38
38
  * Provide content and content type for maven-maven stack analysis.
39
- * @param {string} manifest - the manifest path or name
40
- * @param {{}} [opts={}] - optional various options to pass along the application
41
- * @returns {Provided}
39
+ * @param {string} manifest the manifest path or name
40
+ * @param {{}} [opts={}] optional various options to pass along the application
41
+ * @returns {Promise<Provided>}
42
42
  */
43
- declare function provideStack(manifest: string, opts?: {}): Provided;
43
+ declare function provideStack(manifest: string, opts?: {}): Promise<Provided>;
44
44
  /**
45
45
  * Go modules have no standard license field in go.mod
46
- * @param {string} manifestPath - path to go.mod
46
+ * @param {string} manifestPath path to go.mod
47
47
  * @returns {string|null}
48
48
  */
49
49
  declare function readLicenseFromManifest(manifestPath: string): string | null;