stackscan 0.1.24 → 0.1.29

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 (51) hide show
  1. package/README.md +10 -0
  2. package/dist/add.mjs +3 -2
  3. package/dist/chunk-2ZANNQYS.mjs +162 -0
  4. package/dist/chunk-5AYPCRZA.mjs +21 -0
  5. package/dist/chunk-CFGUYUPP.mjs +42 -0
  6. package/dist/chunk-DF3YGYKJ.mjs +2241 -0
  7. package/dist/chunk-GFZMRHRT.mjs +181 -0
  8. package/dist/chunk-HT4RZGLE.mjs +267 -0
  9. package/dist/chunk-IFB4PCXR.mjs +28 -0
  10. package/dist/chunk-MFJXW5RR.mjs +6 -0
  11. package/dist/chunk-SECL5E42.mjs +23 -0
  12. package/dist/chunk-STCTH5AY.mjs +15619 -0
  13. package/dist/chunk-ZYFKPOWH.mjs +54 -0
  14. package/dist/cli.js +34 -7
  15. package/dist/cli.mjs +11 -7
  16. package/dist/defaults.mjs +3 -2
  17. package/dist/defaults.test.d.mts +2 -0
  18. package/dist/defaults.test.d.ts +2 -0
  19. package/dist/defaults.test.js +17007 -0
  20. package/dist/defaults.test.mjs +30 -0
  21. package/dist/index.js +34 -7
  22. package/dist/index.mjs +18 -12
  23. package/dist/magic-string.es-WH4FGKAB.mjs +1315 -0
  24. package/dist/output.mjs +4 -3
  25. package/dist/output.test.d.mts +2 -0
  26. package/dist/output.test.d.ts +2 -0
  27. package/dist/output.test.js +20687 -0
  28. package/dist/output.test.mjs +160 -0
  29. package/dist/scan.js +34 -7
  30. package/dist/scan.mjs +7 -6
  31. package/dist/scan.test.d.mts +2 -0
  32. package/dist/scan.test.d.ts +2 -0
  33. package/dist/scan.test.js +23184 -0
  34. package/dist/scan.test.mjs +183 -0
  35. package/dist/simple-icons-hex.mjs +1 -0
  36. package/dist/sync.js +1 -2
  37. package/dist/sync.mjs +7 -6
  38. package/dist/techDefinitions.js +1 -2
  39. package/dist/techDefinitions.mjs +3 -2
  40. package/dist/techMap.js +1 -2
  41. package/dist/techMap.mjs +4 -3
  42. package/dist/techMap.test.d.mts +2 -0
  43. package/dist/techMap.test.d.ts +2 -0
  44. package/dist/techMap.test.js +19240 -0
  45. package/dist/techMap.test.mjs +38 -0
  46. package/dist/types.mjs +3 -2
  47. package/package.json +9 -4
  48. package/public/assets/logos/defaults/package.svg +18 -18
  49. package/public/assets/logos/defaults/terminal.svg +16 -16
  50. package/public/assets/logos/defaults/wrench.svg +15 -15
  51. package/public/assets/logos/testing/vitest.svg +1 -1
@@ -0,0 +1,54 @@
1
+ import {
2
+ init_esm_shims
3
+ } from "./chunk-5AYPCRZA.mjs";
4
+
5
+ // src/add.ts
6
+ init_esm_shims();
7
+ import fs from "fs-extra";
8
+ import path from "path";
9
+ import chalk from "chalk";
10
+ var BASE_DIR = path.join(process.cwd(), "public", "stackscan");
11
+ async function add(sourcePath) {
12
+ let absoluteSourcePath = path.resolve(sourcePath);
13
+ if (!fs.existsSync(absoluteSourcePath)) {
14
+ console.error(chalk.red(`\u274C Path not found: ${sourcePath}`));
15
+ process.exit(1);
16
+ }
17
+ if (fs.statSync(absoluteSourcePath).isDirectory()) {
18
+ absoluteSourcePath = path.join(absoluteSourcePath, "package.json");
19
+ if (!fs.existsSync(absoluteSourcePath)) {
20
+ console.error(chalk.red(`\u274C No package.json found in directory: ${sourcePath}`));
21
+ process.exit(1);
22
+ }
23
+ }
24
+ try {
25
+ const content = fs.readFileSync(absoluteSourcePath, "utf-8");
26
+ const pkg = JSON.parse(content);
27
+ if (!pkg.name) {
28
+ console.error(chalk.red(`\u274C No "name" field found in ${sourcePath}`));
29
+ process.exit(1);
30
+ }
31
+ const baseFolderName = pkg.name.replace(/^@/, "").replace(/\//g, "-");
32
+ let folderName = baseFolderName;
33
+ let targetDir = path.join(BASE_DIR, folderName);
34
+ let counter = 1;
35
+ while (fs.existsSync(targetDir)) {
36
+ folderName = `${baseFolderName}-${counter}`;
37
+ targetDir = path.join(BASE_DIR, folderName);
38
+ counter++;
39
+ }
40
+ const targetFile = path.join(targetDir, "package.json");
41
+ if (!fs.existsSync(targetDir)) {
42
+ fs.mkdirSync(targetDir, { recursive: true });
43
+ }
44
+ fs.copyFileSync(absoluteSourcePath, targetFile);
45
+ console.log(chalk.green(`\u2705 Added project "${pkg.name}" to public/stackscan/${folderName}`));
46
+ } catch (error) {
47
+ console.error(chalk.red(`\u274C Error processing ${sourcePath}:`), error);
48
+ process.exit(1);
49
+ }
50
+ }
51
+
52
+ export {
53
+ add
54
+ };
package/dist/cli.js CHANGED
@@ -573,7 +573,7 @@ var techDefinitions = [
573
573
  "id": "rtkquery",
574
574
  "name": "RTK Query",
575
575
  "aliases": [
576
- "@reduxjs/toolkit"
576
+ "@rtk-query/graphql-request-base-query"
577
577
  ],
578
578
  "category": "state",
579
579
  "logo": "state/redux.svg",
@@ -1617,7 +1617,6 @@ var techDefinitions = [
1617
1617
  "aliases": [
1618
1618
  "aws-sdk",
1619
1619
  "@aws-sdk/client-s3",
1620
- "@aws-sdk/client-dynamodb",
1621
1620
  "@aws-sdk/client-lambda"
1622
1621
  ],
1623
1622
  "category": "cloud",
@@ -5832,6 +5831,36 @@ var BASE_DIR = import_path2.default.join(process.cwd(), "public", "stackscan");
5832
5831
  var SKIPPED_TECHS = [
5833
5832
  "react-dom"
5834
5833
  ];
5834
+ function getPackageJson(projectPath) {
5835
+ const pkgPath = import_path2.default.join(projectPath, "package.json");
5836
+ const pkgPathUnderscore = import_path2.default.join(projectPath, "_package.json");
5837
+ const isInsideStackScanDir = projectPath.includes(import_path2.default.join("public", "stackscan"));
5838
+ if (import_fs.default.existsSync(pkgPath) && isInsideStackScanDir) {
5839
+ try {
5840
+ console.log(`Renaming ${pkgPath} to ${pkgPathUnderscore}`);
5841
+ import_fs.default.renameSync(pkgPath, pkgPathUnderscore);
5842
+ } catch (e) {
5843
+ console.warn(`Failed to rename package.json to _package.json: ${e.message}`);
5844
+ }
5845
+ }
5846
+ if (import_fs.default.existsSync(pkgPathUnderscore)) {
5847
+ try {
5848
+ const content = import_fs.default.readFileSync(pkgPathUnderscore, "utf-8");
5849
+ return JSON.parse(content);
5850
+ } catch (e) {
5851
+ throw new Error(`Failed to read _package.json: ${e.message}`);
5852
+ }
5853
+ }
5854
+ if (import_fs.default.existsSync(pkgPath)) {
5855
+ try {
5856
+ const content = import_fs.default.readFileSync(pkgPath, "utf-8");
5857
+ return JSON.parse(content);
5858
+ } catch (e) {
5859
+ throw new Error(`Failed to read package.json: ${e.message}`);
5860
+ }
5861
+ }
5862
+ return null;
5863
+ }
5835
5864
  var CATEGORY_PRIORITY = [
5836
5865
  "language",
5837
5866
  "framework",
@@ -5868,12 +5897,10 @@ var getCategoryPriority = (cat) => {
5868
5897
  return idx === -1 ? 999 : idx;
5869
5898
  };
5870
5899
  async function analyzeProject(projectPath, options) {
5871
- const packageJsonPath = import_path2.default.join(projectPath, "package.json");
5872
- if (!import_fs.default.existsSync(packageJsonPath)) {
5873
- throw new Error(`No package.json found at ${packageJsonPath}`);
5900
+ const pkg = getPackageJson(projectPath);
5901
+ if (!pkg) {
5902
+ throw new Error(`No package.json or _package.json found at ${projectPath}`);
5874
5903
  }
5875
- const content = import_fs.default.readFileSync(packageJsonPath, "utf-8");
5876
- const pkg = JSON.parse(content);
5877
5904
  const allDeps = { ...pkg.dependencies, ...pkg.devDependencies };
5878
5905
  const detectedTechs = [];
5879
5906
  Object.keys(allDeps).forEach((dep) => {
package/dist/cli.mjs CHANGED
@@ -1,18 +1,22 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  add
4
- } from "./chunk-ACCTMJVS.mjs";
4
+ } from "./chunk-ZYFKPOWH.mjs";
5
5
  import {
6
6
  scan
7
- } from "./chunk-24PM76MV.mjs";
8
- import "./chunk-HKCVFKM4.mjs";
9
- import "./chunk-E75XPZ2U.mjs";
10
- import "./chunk-UJM3S22V.mjs";
11
- import "./chunk-NGEKE4DQ.mjs";
12
- import "./chunk-EOKQCSHI.mjs";
7
+ } from "./chunk-HT4RZGLE.mjs";
8
+ import "./chunk-SECL5E42.mjs";
9
+ import "./chunk-DF3YGYKJ.mjs";
10
+ import "./chunk-GFZMRHRT.mjs";
13
11
  import "./chunk-EH2SEQZP.mjs";
12
+ import "./chunk-IFB4PCXR.mjs";
13
+ import {
14
+ init_esm_shims
15
+ } from "./chunk-5AYPCRZA.mjs";
16
+ import "./chunk-CFGUYUPP.mjs";
14
17
 
15
18
  // src/cli.ts
19
+ init_esm_shims();
16
20
  import { Command } from "commander";
17
21
  var program = new Command();
18
22
  program.name("stackscan").description("Auto-detect tech stacks and generate tech.json or markdown.").version("0.1.0");
package/dist/defaults.mjs CHANGED
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  DEFAULT_CATEGORY_ICONS
3
- } from "./chunk-NGEKE4DQ.mjs";
4
- import "./chunk-EOKQCSHI.mjs";
3
+ } from "./chunk-IFB4PCXR.mjs";
4
+ import "./chunk-5AYPCRZA.mjs";
5
+ import "./chunk-CFGUYUPP.mjs";
5
6
  export {
6
7
  DEFAULT_CATEGORY_ICONS
7
8
  };
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,2 @@
1
+
2
+ export { }