@akanjs/devkit 0.0.53 → 0.0.55
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/index.cjs +17 -0
- package/index.js +1 -17
- package/package.json +8 -2
- package/src/aiEditor.cjs +46 -0
- package/src/aiEditor.js +8 -27
- package/src/auth.cjs +64 -0
- package/src/auth.js +23 -45
- package/src/baseDevEnv.cjs +45 -0
- package/src/baseDevEnv.js +4 -23
- package/src/capacitorApp.cjs +153 -0
- package/src/capacitorApp.js +10 -39
- package/src/commandDecorators/argMeta.cjs +67 -0
- package/src/commandDecorators/argMeta.js +12 -31
- package/src/commandDecorators/command.cjs +160 -0
- package/src/commandDecorators/command.js +30 -49
- package/src/commandDecorators/commandMeta.cjs +26 -0
- package/src/commandDecorators/commandMeta.js +3 -22
- package/src/commandDecorators/index.cjs +21 -0
- package/src/commandDecorators/index.js +5 -21
- package/src/commandDecorators/targetMeta.cjs +52 -0
- package/src/commandDecorators/targetMeta.js +4 -23
- package/src/commandDecorators/types.cjs +15 -0
- package/src/commandDecorators/types.js +0 -15
- package/src/constants.cjs +37 -0
- package/src/constants.js +11 -30
- package/src/createTunnel.cjs +37 -0
- package/src/createTunnel.js +7 -26
- package/src/dependencyScanner.cjs +159 -0
- package/src/dependencyScanner.js +6 -35
- package/src/executors.cjs +592 -0
- package/src/executors.js +91 -116
- package/src/extractDeps.cjs +99 -0
- package/src/extractDeps.js +3 -22
- package/src/getCredentials.cjs +40 -0
- package/src/getCredentials.js +7 -36
- package/src/getDependencies.cjs +51 -0
- package/src/getDependencies.js +5 -24
- package/src/getModelFileData.cjs +62 -0
- package/src/getModelFileData.js +7 -36
- package/src/getRelatedCnsts.cjs +138 -0
- package/src/getRelatedCnsts.js +8 -37
- package/src/index.cjs +34 -0
- package/src/index.js +18 -34
- package/src/installExternalLib.cjs +29 -0
- package/src/installExternalLib.js +3 -22
- package/src/selectModel.cjs +42 -0
- package/src/selectModel.js +7 -36
- package/src/streamAi.cjs +56 -0
- package/src/streamAi.js +8 -27
- package/src/types.cjs +15 -0
- package/src/types.d.ts +2 -0
- package/src/types.js +0 -15
- package/src/uploadRelease.cjs +81 -0
- package/src/uploadRelease.js +16 -45
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var constants_exports = {};
|
|
19
|
+
__export(constants_exports, {
|
|
20
|
+
akanCloudBackendUrl: () => akanCloudBackendUrl,
|
|
21
|
+
akanCloudClientUrl: () => akanCloudClientUrl,
|
|
22
|
+
akanCloudHost: () => akanCloudHost,
|
|
23
|
+
basePath: () => basePath,
|
|
24
|
+
configPath: () => configPath,
|
|
25
|
+
defaultAkanGlobalConfig: () => defaultAkanGlobalConfig,
|
|
26
|
+
defaultHostConfig: () => defaultHostConfig
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(constants_exports);
|
|
29
|
+
var import_os = require("os");
|
|
30
|
+
const basePath = `${(0, import_os.homedir)()}/.akan`;
|
|
31
|
+
const configPath = `${basePath}/config.json`;
|
|
32
|
+
const akanCloudHost = process.env.NEXT_PUBLIC_OPERATION_MODE === "local" ? "http://localhost" : "https://akasys-debug.akamir.com";
|
|
33
|
+
//! Temp
|
|
34
|
+
const akanCloudBackendUrl = `${akanCloudHost}${process.env.NEXT_PUBLIC_OPERATION_MODE === "local" ? ":8080" : ""}/backend`;
|
|
35
|
+
const akanCloudClientUrl = `${akanCloudHost}${process.env.NEXT_PUBLIC_OPERATION_MODE === "local" ? ":4200" : ""}`;
|
|
36
|
+
const defaultHostConfig = {};
|
|
37
|
+
const defaultAkanGlobalConfig = {};
|
package/src/constants.js
CHANGED
|
@@ -1,33 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var constants_exports = {};
|
|
19
|
-
__export(constants_exports, {
|
|
20
|
-
akanCloudBackendUrl: () => akanCloudBackendUrl,
|
|
21
|
-
akanCloudClientUrl: () => akanCloudClientUrl,
|
|
22
|
-
akanCloudHost: () => akanCloudHost,
|
|
23
|
-
basePath: () => basePath,
|
|
24
|
-
configPath: () => configPath,
|
|
25
|
-
defaultAkanGlobalConfig: () => defaultAkanGlobalConfig,
|
|
26
|
-
defaultHostConfig: () => defaultHostConfig
|
|
27
|
-
});
|
|
28
|
-
module.exports = __toCommonJS(constants_exports);
|
|
29
|
-
var import_os = require("os");
|
|
30
|
-
const basePath = `${(0, import_os.homedir)()}/.akan`;
|
|
1
|
+
import { homedir } from "os";
|
|
2
|
+
const basePath = `${homedir()}/.akan`;
|
|
31
3
|
const configPath = `${basePath}/config.json`;
|
|
32
4
|
const akanCloudHost = process.env.NEXT_PUBLIC_OPERATION_MODE === "local" ? "http://localhost" : "https://akasys-debug.akamir.com";
|
|
33
5
|
//! Temp
|
|
@@ -35,3 +7,12 @@ const akanCloudBackendUrl = `${akanCloudHost}${process.env.NEXT_PUBLIC_OPERATION
|
|
|
35
7
|
const akanCloudClientUrl = `${akanCloudHost}${process.env.NEXT_PUBLIC_OPERATION_MODE === "local" ? ":4200" : ""}`;
|
|
36
8
|
const defaultHostConfig = {};
|
|
37
9
|
const defaultAkanGlobalConfig = {};
|
|
10
|
+
export {
|
|
11
|
+
akanCloudBackendUrl,
|
|
12
|
+
akanCloudClientUrl,
|
|
13
|
+
akanCloudHost,
|
|
14
|
+
basePath,
|
|
15
|
+
configPath,
|
|
16
|
+
defaultAkanGlobalConfig,
|
|
17
|
+
defaultHostConfig
|
|
18
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var createTunnel_exports = {};
|
|
19
|
+
__export(createTunnel_exports, {
|
|
20
|
+
createTunnel: () => createTunnel
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(createTunnel_exports);
|
|
23
|
+
var import_tunnel_ssh = require("tunnel-ssh");
|
|
24
|
+
var import_baseDevEnv = require("./baseDevEnv");
|
|
25
|
+
const createTunnel = async ({ appName, environment, port = 27017 }) => {
|
|
26
|
+
const tunnelOptions = { autoClose: true, reconnectOnError: true };
|
|
27
|
+
const sshOptions = (0, import_baseDevEnv.getSshTunnelOptions)(appName, environment);
|
|
28
|
+
const serverOptions = { port };
|
|
29
|
+
const forwardOptions = {
|
|
30
|
+
srcAddr: "0.0.0.0",
|
|
31
|
+
srcPort: port,
|
|
32
|
+
dstAddr: `mongo-0.mongo-svc.${appName}-${environment}`,
|
|
33
|
+
dstPort: 27017
|
|
34
|
+
};
|
|
35
|
+
const [server, client] = await (0, import_tunnel_ssh.createTunnel)(tunnelOptions, serverOptions, sshOptions, forwardOptions);
|
|
36
|
+
return `localhost:${port}`;
|
|
37
|
+
};
|
package/src/createTunnel.js
CHANGED
|
@@ -1,30 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var createTunnel_exports = {};
|
|
19
|
-
__export(createTunnel_exports, {
|
|
20
|
-
createTunnel: () => createTunnel
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(createTunnel_exports);
|
|
23
|
-
var import_tunnel_ssh = require("tunnel-ssh");
|
|
24
|
-
var import_baseDevEnv = require("./baseDevEnv");
|
|
1
|
+
import { createTunnel as create } from "tunnel-ssh";
|
|
2
|
+
import { getSshTunnelOptions } from "./baseDevEnv";
|
|
25
3
|
const createTunnel = async ({ appName, environment, port = 27017 }) => {
|
|
26
4
|
const tunnelOptions = { autoClose: true, reconnectOnError: true };
|
|
27
|
-
const sshOptions =
|
|
5
|
+
const sshOptions = getSshTunnelOptions(appName, environment);
|
|
28
6
|
const serverOptions = { port };
|
|
29
7
|
const forwardOptions = {
|
|
30
8
|
srcAddr: "0.0.0.0",
|
|
@@ -32,6 +10,9 @@ const createTunnel = async ({ appName, environment, port = 27017 }) => {
|
|
|
32
10
|
dstAddr: `mongo-0.mongo-svc.${appName}-${environment}`,
|
|
33
11
|
dstPort: 27017
|
|
34
12
|
};
|
|
35
|
-
const [server, client] = await (
|
|
13
|
+
const [server, client] = await create(tunnelOptions, serverOptions, sshOptions, forwardOptions);
|
|
36
14
|
return `localhost:${port}`;
|
|
37
15
|
};
|
|
16
|
+
export {
|
|
17
|
+
createTunnel
|
|
18
|
+
};
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
#!/usr/bin/env ts-node
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var dependencyScanner_exports = {};
|
|
30
|
+
__export(dependencyScanner_exports, {
|
|
31
|
+
TypeScriptDependencyScanner: () => TypeScriptDependencyScanner
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(dependencyScanner_exports);
|
|
34
|
+
var fs = __toESM(require("fs"), 1);
|
|
35
|
+
var path = __toESM(require("path"), 1);
|
|
36
|
+
var ts = __toESM(require("typescript"), 1);
|
|
37
|
+
class TypeScriptDependencyScanner {
|
|
38
|
+
constructor(directory) {
|
|
39
|
+
this.directory = directory;
|
|
40
|
+
}
|
|
41
|
+
#fileDependencies = /* @__PURE__ */ new Map();
|
|
42
|
+
#visitedFiles = /* @__PURE__ */ new Set();
|
|
43
|
+
async getImportSets(depSets) {
|
|
44
|
+
const fileDependencies = await this.getDependencies();
|
|
45
|
+
const importedDepSets = new Array(depSets.length);
|
|
46
|
+
for (let i = 0; i < depSets.length; i++)
|
|
47
|
+
importedDepSets[i] = /* @__PURE__ */ new Set();
|
|
48
|
+
fileDependencies.forEach((imps) => {
|
|
49
|
+
imps.forEach((imp) => {
|
|
50
|
+
if (imp.startsWith("."))
|
|
51
|
+
return;
|
|
52
|
+
const moduleName = imp;
|
|
53
|
+
const moduleNameParts = moduleName.split("/");
|
|
54
|
+
const subModuleLength = moduleNameParts.length;
|
|
55
|
+
for (let i = 0; i < subModuleLength; i++) {
|
|
56
|
+
const importName = moduleNameParts.slice(0, i + 1).join("/");
|
|
57
|
+
for (let j = 0; j < depSets.length; j++) {
|
|
58
|
+
if (depSets[j].has(importName)) {
|
|
59
|
+
importedDepSets[j].add(importName);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
return importedDepSets;
|
|
67
|
+
}
|
|
68
|
+
async getDependencies() {
|
|
69
|
+
this.#fileDependencies.clear();
|
|
70
|
+
this.#visitedFiles.clear();
|
|
71
|
+
const files = await this.#findTypeScriptFiles(this.directory);
|
|
72
|
+
for (const file of files)
|
|
73
|
+
await this.#analyzeFile(file, this.directory);
|
|
74
|
+
return this.#fileDependencies;
|
|
75
|
+
}
|
|
76
|
+
async #findTypeScriptFiles(directory) {
|
|
77
|
+
const files = [];
|
|
78
|
+
const processDirectory = async (dir) => {
|
|
79
|
+
const entries = await fs.promises.readdir(dir, { withFileTypes: true });
|
|
80
|
+
for (const entry of entries) {
|
|
81
|
+
const fullPath = path.join(dir, entry.name);
|
|
82
|
+
if (entry.isDirectory()) {
|
|
83
|
+
if (!["node_modules", "dist", "build", ".git", ".next", "public", "ios", "android"].includes(entry.name))
|
|
84
|
+
await processDirectory(fullPath);
|
|
85
|
+
} else if (entry.isFile() && (entry.name.endsWith(".ts") || entry.name.endsWith(".tsx")))
|
|
86
|
+
files.push(fullPath);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
await processDirectory(directory);
|
|
90
|
+
return files;
|
|
91
|
+
}
|
|
92
|
+
async #analyzeFile(filePath, baseDir) {
|
|
93
|
+
if (this.#visitedFiles.has(filePath))
|
|
94
|
+
return;
|
|
95
|
+
this.#visitedFiles.add(filePath);
|
|
96
|
+
try {
|
|
97
|
+
const fileContent = await fs.promises.readFile(filePath, "utf-8");
|
|
98
|
+
const imports = this.#extractImports(fileContent, filePath);
|
|
99
|
+
const resolvedImports = imports.map((importPath) => {
|
|
100
|
+
if (importPath.startsWith(".")) {
|
|
101
|
+
const resolvedPath = "./" + path.join(path.relative(baseDir, filePath), importPath);
|
|
102
|
+
return this.#ensureExtension(resolvedPath);
|
|
103
|
+
}
|
|
104
|
+
return importPath;
|
|
105
|
+
});
|
|
106
|
+
const relativePath = path.relative(baseDir, filePath);
|
|
107
|
+
this.#fileDependencies.set(relativePath, resolvedImports);
|
|
108
|
+
} catch (error) {
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
#ensureExtension(filePath) {
|
|
112
|
+
if (fs.existsSync(`${filePath}.ts`))
|
|
113
|
+
return `${filePath}.ts`;
|
|
114
|
+
else if (fs.existsSync(`${filePath}.tsx`))
|
|
115
|
+
return `${filePath}.tsx`;
|
|
116
|
+
else if (fs.existsSync(filePath))
|
|
117
|
+
return filePath;
|
|
118
|
+
return `${filePath}.ts`;
|
|
119
|
+
}
|
|
120
|
+
#extractImports(source, filePath) {
|
|
121
|
+
const imports = [];
|
|
122
|
+
const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true);
|
|
123
|
+
const visit = (node) => {
|
|
124
|
+
if (ts.isImportDeclaration(node)) {
|
|
125
|
+
const moduleSpecifier = node.moduleSpecifier;
|
|
126
|
+
if (ts.isStringLiteral(moduleSpecifier))
|
|
127
|
+
imports.push(moduleSpecifier.text);
|
|
128
|
+
}
|
|
129
|
+
ts.forEachChild(node, visit);
|
|
130
|
+
};
|
|
131
|
+
visit(sourceFile);
|
|
132
|
+
return imports;
|
|
133
|
+
}
|
|
134
|
+
generateDependencyGraph() {
|
|
135
|
+
let graph = "Dependency Graph:\n\n";
|
|
136
|
+
for (const [file, imports] of this.#fileDependencies.entries()) {
|
|
137
|
+
graph += `${file}:
|
|
138
|
+
`;
|
|
139
|
+
const projectImports = imports.filter((i) => !i.startsWith("react") && !i.startsWith("@"));
|
|
140
|
+
const externalImports = imports.filter((i) => i.startsWith("react") || i.startsWith("@"));
|
|
141
|
+
if (projectImports.length > 0) {
|
|
142
|
+
graph += " Project dependencies:\n";
|
|
143
|
+
projectImports.forEach((imp) => {
|
|
144
|
+
graph += ` \u2192 ${imp}
|
|
145
|
+
`;
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
if (externalImports.length > 0) {
|
|
149
|
+
graph += " External dependencies:\n";
|
|
150
|
+
externalImports.forEach((imp) => {
|
|
151
|
+
graph += ` \u2192 ${imp}
|
|
152
|
+
`;
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
graph += "\n";
|
|
156
|
+
}
|
|
157
|
+
return graph;
|
|
158
|
+
}
|
|
159
|
+
}
|
package/src/dependencyScanner.js
CHANGED
|
@@ -1,39 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env ts-node
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var dependencyScanner_exports = {};
|
|
30
|
-
__export(dependencyScanner_exports, {
|
|
31
|
-
TypeScriptDependencyScanner: () => TypeScriptDependencyScanner
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(dependencyScanner_exports);
|
|
34
|
-
var fs = __toESM(require("fs"));
|
|
35
|
-
var path = __toESM(require("path"));
|
|
36
|
-
var ts = __toESM(require("typescript"));
|
|
2
|
+
import * as fs from "fs";
|
|
3
|
+
import * as path from "path";
|
|
4
|
+
import * as ts from "typescript";
|
|
37
5
|
class TypeScriptDependencyScanner {
|
|
38
6
|
constructor(directory) {
|
|
39
7
|
this.directory = directory;
|
|
@@ -157,3 +125,6 @@ class TypeScriptDependencyScanner {
|
|
|
157
125
|
return graph;
|
|
158
126
|
}
|
|
159
127
|
}
|
|
128
|
+
export {
|
|
129
|
+
TypeScriptDependencyScanner
|
|
130
|
+
};
|