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,30 @@
1
+ import {
2
+ describe,
3
+ globalExpect,
4
+ it
5
+ } from "./chunk-STCTH5AY.mjs";
6
+ import {
7
+ DEFAULT_CATEGORY_ICONS
8
+ } from "./chunk-IFB4PCXR.mjs";
9
+ import {
10
+ init_esm_shims
11
+ } from "./chunk-5AYPCRZA.mjs";
12
+ import "./chunk-CFGUYUPP.mjs";
13
+
14
+ // src/defaults.test.ts
15
+ init_esm_shims();
16
+ describe("DEFAULT_CATEGORY_ICONS", () => {
17
+ it("should be a record with string keys and string values", () => {
18
+ Object.entries(DEFAULT_CATEGORY_ICONS).forEach(([key, value]) => {
19
+ globalExpect(typeof key).toBe("string");
20
+ globalExpect(typeof value).toBe("string");
21
+ globalExpect(key.length).toBeGreaterThan(0);
22
+ globalExpect(value.length).toBeGreaterThan(0);
23
+ });
24
+ });
25
+ it("should contain expected default icon mappings", () => {
26
+ globalExpect(DEFAULT_CATEGORY_ICONS.ai).toBe("brain");
27
+ globalExpect(DEFAULT_CATEGORY_ICONS.auth).toBe("lock");
28
+ globalExpect(DEFAULT_CATEGORY_ICONS.utility).toBe("wrench");
29
+ });
30
+ });
package/dist/index.js CHANGED
@@ -4207,7 +4207,7 @@ var techDefinitions = [
4207
4207
  "id": "rtkquery",
4208
4208
  "name": "RTK Query",
4209
4209
  "aliases": [
4210
- "@reduxjs/toolkit"
4210
+ "@rtk-query/graphql-request-base-query"
4211
4211
  ],
4212
4212
  "category": "state",
4213
4213
  "logo": "state/redux.svg",
@@ -5251,7 +5251,6 @@ var techDefinitions = [
5251
5251
  "aliases": [
5252
5252
  "aws-sdk",
5253
5253
  "@aws-sdk/client-s3",
5254
- "@aws-sdk/client-dynamodb",
5255
5254
  "@aws-sdk/client-lambda"
5256
5255
  ],
5257
5256
  "category": "cloud",
@@ -5919,6 +5918,36 @@ var BASE_DIR2 = import_path3.default.join(process.cwd(), "public", "stackscan");
5919
5918
  var SKIPPED_TECHS = [
5920
5919
  "react-dom"
5921
5920
  ];
5921
+ function getPackageJson(projectPath) {
5922
+ const pkgPath = import_path3.default.join(projectPath, "package.json");
5923
+ const pkgPathUnderscore = import_path3.default.join(projectPath, "_package.json");
5924
+ const isInsideStackScanDir = projectPath.includes(import_path3.default.join("public", "stackscan"));
5925
+ if (import_fs.default.existsSync(pkgPath) && isInsideStackScanDir) {
5926
+ try {
5927
+ console.log(`Renaming ${pkgPath} to ${pkgPathUnderscore}`);
5928
+ import_fs.default.renameSync(pkgPath, pkgPathUnderscore);
5929
+ } catch (e) {
5930
+ console.warn(`Failed to rename package.json to _package.json: ${e.message}`);
5931
+ }
5932
+ }
5933
+ if (import_fs.default.existsSync(pkgPathUnderscore)) {
5934
+ try {
5935
+ const content = import_fs.default.readFileSync(pkgPathUnderscore, "utf-8");
5936
+ return JSON.parse(content);
5937
+ } catch (e) {
5938
+ throw new Error(`Failed to read _package.json: ${e.message}`);
5939
+ }
5940
+ }
5941
+ if (import_fs.default.existsSync(pkgPath)) {
5942
+ try {
5943
+ const content = import_fs.default.readFileSync(pkgPath, "utf-8");
5944
+ return JSON.parse(content);
5945
+ } catch (e) {
5946
+ throw new Error(`Failed to read package.json: ${e.message}`);
5947
+ }
5948
+ }
5949
+ return null;
5950
+ }
5922
5951
  var CATEGORY_PRIORITY = [
5923
5952
  "language",
5924
5953
  "framework",
@@ -5955,12 +5984,10 @@ var getCategoryPriority = (cat) => {
5955
5984
  return idx === -1 ? 999 : idx;
5956
5985
  };
5957
5986
  async function analyzeProject(projectPath, options) {
5958
- const packageJsonPath = import_path3.default.join(projectPath, "package.json");
5959
- if (!import_fs.default.existsSync(packageJsonPath)) {
5960
- throw new Error(`No package.json found at ${packageJsonPath}`);
5987
+ const pkg = getPackageJson(projectPath);
5988
+ if (!pkg) {
5989
+ throw new Error(`No package.json or _package.json found at ${projectPath}`);
5961
5990
  }
5962
- const content = import_fs.default.readFileSync(packageJsonPath, "utf-8");
5963
- const pkg = JSON.parse(content);
5964
5991
  const allDeps = { ...pkg.dependencies, ...pkg.devDependencies };
5965
5992
  const detectedTechs = [];
5966
5993
  Object.keys(allDeps).forEach((dep) => {
package/dist/index.mjs CHANGED
@@ -1,29 +1,35 @@
1
- import "./chunk-WAXGOBY2.mjs";
1
+ import {
2
+ sync
3
+ } from "./chunk-2ZANNQYS.mjs";
4
+ import "./chunk-MFJXW5RR.mjs";
2
5
  import {
3
6
  add
4
- } from "./chunk-ACCTMJVS.mjs";
7
+ } from "./chunk-ZYFKPOWH.mjs";
5
8
  import {
6
9
  scan
7
- } from "./chunk-24PM76MV.mjs";
8
- import {
9
- sync
10
- } from "./chunk-XNTLNSF6.mjs";
10
+ } from "./chunk-HT4RZGLE.mjs";
11
11
  import {
12
12
  techMap
13
- } from "./chunk-HKCVFKM4.mjs";
13
+ } from "./chunk-SECL5E42.mjs";
14
14
  import {
15
15
  techDefinitions
16
- } from "./chunk-E75XPZ2U.mjs";
16
+ } from "./chunk-DF3YGYKJ.mjs";
17
17
  import {
18
18
  copyAssets,
19
19
  generateMarkdown,
20
20
  writeOutput
21
- } from "./chunk-UJM3S22V.mjs";
21
+ } from "./chunk-GFZMRHRT.mjs";
22
+ import "./chunk-EH2SEQZP.mjs";
22
23
  import {
23
24
  DEFAULT_CATEGORY_ICONS
24
- } from "./chunk-NGEKE4DQ.mjs";
25
- import "./chunk-EOKQCSHI.mjs";
26
- import "./chunk-EH2SEQZP.mjs";
25
+ } from "./chunk-IFB4PCXR.mjs";
26
+ import {
27
+ init_esm_shims
28
+ } from "./chunk-5AYPCRZA.mjs";
29
+ import "./chunk-CFGUYUPP.mjs";
30
+
31
+ // src/index.ts
32
+ init_esm_shims();
27
33
  export {
28
34
  DEFAULT_CATEGORY_ICONS,
29
35
  add,