@cloud-copilot/iam-lens 0.1.106 → 0.1.108
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.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Get the path to a worker script, adjusted for the build output location.
|
|
3
3
|
*
|
|
4
4
|
* @param path the relative path to the worker script from the project src directory and with a .js extension
|
|
5
|
-
* @returns the absolute path to the worker script
|
|
5
|
+
* @returns the absolute path to the worker script, or undefined if the file does not exist
|
|
6
6
|
*/
|
|
7
|
-
export declare function getWorkerScriptPath(path: string): string;
|
|
7
|
+
export declare function getWorkerScriptPath(path: string): string | undefined;
|
|
8
8
|
//# sourceMappingURL=workerScriptEsm.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { existsSync } from 'fs';
|
|
1
2
|
import { join, resolve } from 'path';
|
|
2
3
|
//@ts-ignore
|
|
3
4
|
let root = resolve(import.meta.url.replace('file://', ''), '../../');
|
|
@@ -8,9 +9,10 @@ if (process.env.IAM_LENS_WORKER_ROOT) {
|
|
|
8
9
|
* Get the path to a worker script, adjusted for the build output location.
|
|
9
10
|
*
|
|
10
11
|
* @param path the relative path to the worker script from the project src directory and with a .js extension
|
|
11
|
-
* @returns the absolute path to the worker script
|
|
12
|
+
* @returns the absolute path to the worker script, or undefined if the file does not exist
|
|
12
13
|
*/
|
|
13
14
|
export function getWorkerScriptPath(path) {
|
|
14
|
-
|
|
15
|
+
const fullPath = join(root, path);
|
|
16
|
+
return existsSync(fullPath) ? fullPath : undefined;
|
|
15
17
|
}
|
|
16
18
|
//# sourceMappingURL=workerScriptEsm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workerScriptEsm.js","sourceRoot":"","sources":["../../../src/utils/workerScriptEsm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEpC,YAAY;AACZ,IAAI,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAA;AACpE,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,CAAC;IACrC,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAA;AACzC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAC9C,
|
|
1
|
+
{"version":3,"file":"workerScriptEsm.js","sourceRoot":"","sources":["../../../src/utils/workerScriptEsm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAA;AAC/B,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEpC,YAAY;AACZ,IAAI,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAA;AACpE,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,CAAC;IACrC,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAA;AACzC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAC9C,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IACjC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAA;AACpD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workerScriptEsm.d.ts","sourceRoot":"","sources":["../../../src/utils/workerScriptEsm.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workerScriptEsm.d.ts","sourceRoot":"","sources":["../../../src/utils/workerScriptEsm.ts"],"names":[],"mappings":"AASA;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGpE"}
|