stackscan 0.1.23 → 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 (61) hide show
  1. package/README.md +16 -8
  2. package/dist/add.mjs +3 -2
  3. package/dist/chunk-24PM76MV.mjs +235 -0
  4. package/dist/chunk-2ZANNQYS.mjs +162 -0
  5. package/dist/chunk-5AYPCRZA.mjs +21 -0
  6. package/dist/chunk-CFGUYUPP.mjs +42 -0
  7. package/dist/chunk-DF3YGYKJ.mjs +2241 -0
  8. package/dist/chunk-E75XPZ2U.mjs +2237 -0
  9. package/dist/chunk-GFZMRHRT.mjs +181 -0
  10. package/dist/chunk-HKCVFKM4.mjs +19 -0
  11. package/dist/chunk-HT4RZGLE.mjs +267 -0
  12. package/dist/chunk-IFB4PCXR.mjs +28 -0
  13. package/dist/chunk-MFJXW5RR.mjs +6 -0
  14. package/dist/chunk-SECL5E42.mjs +23 -0
  15. package/dist/chunk-STCTH5AY.mjs +15619 -0
  16. package/dist/chunk-XNTLNSF6.mjs +158 -0
  17. package/dist/chunk-ZYFKPOWH.mjs +54 -0
  18. package/dist/cli.js +48 -15
  19. package/dist/cli.mjs +11 -7
  20. package/dist/defaults.mjs +3 -2
  21. package/dist/defaults.test.d.mts +2 -0
  22. package/dist/defaults.test.d.ts +2 -0
  23. package/dist/defaults.test.js +17007 -0
  24. package/dist/defaults.test.mjs +30 -0
  25. package/dist/index.d.mts +1 -1
  26. package/dist/index.d.ts +1 -1
  27. package/dist/index.js +50 -17
  28. package/dist/index.mjs +18 -12
  29. package/dist/magic-string.es-WH4FGKAB.mjs +1315 -0
  30. package/dist/output.d.mts +3 -3
  31. package/dist/output.d.ts +3 -3
  32. package/dist/output.mjs +4 -3
  33. package/dist/output.test.d.mts +2 -0
  34. package/dist/output.test.d.ts +2 -0
  35. package/dist/output.test.js +20687 -0
  36. package/dist/output.test.mjs +160 -0
  37. package/dist/scan.js +48 -15
  38. package/dist/scan.mjs +7 -6
  39. package/dist/scan.test.d.mts +2 -0
  40. package/dist/scan.test.d.ts +2 -0
  41. package/dist/scan.test.js +23184 -0
  42. package/dist/scan.test.mjs +183 -0
  43. package/dist/simple-icons-hex.mjs +1 -0
  44. package/dist/sync.js +15 -10
  45. package/dist/sync.mjs +7 -6
  46. package/dist/techDefinitions.js +13 -8
  47. package/dist/techDefinitions.mjs +3 -2
  48. package/dist/techMap.js +13 -8
  49. package/dist/techMap.mjs +4 -3
  50. package/dist/techMap.test.d.mts +2 -0
  51. package/dist/techMap.test.d.ts +2 -0
  52. package/dist/techMap.test.js +19240 -0
  53. package/dist/techMap.test.mjs +38 -0
  54. package/dist/types.d.mts +2 -2
  55. package/dist/types.d.ts +2 -2
  56. package/dist/types.mjs +3 -2
  57. package/package.json +9 -4
  58. package/public/assets/logos/defaults/package.svg +18 -18
  59. package/public/assets/logos/defaults/terminal.svg +16 -16
  60. package/public/assets/logos/defaults/wrench.svg +15 -15
  61. 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.d.mts CHANGED
@@ -5,4 +5,4 @@ export { scan } from './scan.mjs';
5
5
  export { sync } from './sync.mjs';
6
6
  export { techDefinitions } from './techDefinitions.mjs';
7
7
  export { techMap } from './techMap.mjs';
8
- export { DetectorResult, StackSyncConfig, TechDefinition } from './types.mjs';
8
+ export { DetectorResult, StackScanConfig, TechDefinition } from './types.mjs';
package/dist/index.d.ts CHANGED
@@ -5,4 +5,4 @@ export { scan } from './scan.js';
5
5
  export { sync } from './sync.js';
6
6
  export { techDefinitions } from './techDefinitions.js';
7
7
  export { techMap } from './techMap.js';
8
- export { DetectorResult, StackSyncConfig, TechDefinition } from './types.js';
8
+ export { DetectorResult, StackScanConfig, TechDefinition } from './types.js';
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",
@@ -4502,7 +4502,8 @@ var techDefinitions = [
4502
4502
  "id": "figma",
4503
4503
  "name": "Figma",
4504
4504
  "aliases": [
4505
- "figma"
4505
+ "figma",
4506
+ "figma-api"
4506
4507
  ],
4507
4508
  "category": "utility",
4508
4509
  "logo": "utility/figma.svg",
@@ -4512,7 +4513,8 @@ var techDefinitions = [
4512
4513
  "id": "notion",
4513
4514
  "name": "Notion",
4514
4515
  "aliases": [
4515
- "notion"
4516
+ "notion",
4517
+ "@notionhq/client"
4516
4518
  ],
4517
4519
  "category": "utility",
4518
4520
  "logo": "utility/notion.svg",
@@ -4522,7 +4524,8 @@ var techDefinitions = [
4522
4524
  "id": "slack",
4523
4525
  "name": "Slack",
4524
4526
  "aliases": [
4525
- "slack"
4527
+ "slack",
4528
+ "@slack/web-api"
4526
4529
  ],
4527
4530
  "category": "utility",
4528
4531
  "logo": "utility/slack.svg",
@@ -4542,7 +4545,8 @@ var techDefinitions = [
4542
4545
  "id": "githubcopilot",
4543
4546
  "name": "GitHub Copilot",
4544
4547
  "aliases": [
4545
- "github-copilot"
4548
+ "github-copilot",
4549
+ "github-copilot-extension"
4546
4550
  ],
4547
4551
  "category": "ai",
4548
4552
  "logo": "ai/githubcopilot.svg",
@@ -5174,7 +5178,8 @@ var techDefinitions = [
5174
5178
  "id": "docker",
5175
5179
  "name": "Docker",
5176
5180
  "aliases": [
5177
- "docker"
5181
+ "docker",
5182
+ "dockerode"
5178
5183
  ],
5179
5184
  "category": "container",
5180
5185
  "logo": "container/docker.svg",
@@ -5246,7 +5251,6 @@ var techDefinitions = [
5246
5251
  "aliases": [
5247
5252
  "aws-sdk",
5248
5253
  "@aws-sdk/client-s3",
5249
- "@aws-sdk/client-dynamodb",
5250
5254
  "@aws-sdk/client-lambda"
5251
5255
  ],
5252
5256
  "category": "cloud",
@@ -5287,7 +5291,8 @@ var techDefinitions = [
5287
5291
  "id": "netlify",
5288
5292
  "name": "Netlify",
5289
5293
  "aliases": [
5290
- "netlify"
5294
+ "netlify",
5295
+ "netlify-cli"
5291
5296
  ],
5292
5297
  "category": "hosting",
5293
5298
  "logo": "hosting/netlify.svg",
@@ -5913,6 +5918,36 @@ var BASE_DIR2 = import_path3.default.join(process.cwd(), "public", "stackscan");
5913
5918
  var SKIPPED_TECHS = [
5914
5919
  "react-dom"
5915
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
+ }
5916
5951
  var CATEGORY_PRIORITY = [
5917
5952
  "language",
5918
5953
  "framework",
@@ -5949,12 +5984,10 @@ var getCategoryPriority = (cat) => {
5949
5984
  return idx === -1 ? 999 : idx;
5950
5985
  };
5951
5986
  async function analyzeProject(projectPath, options) {
5952
- const packageJsonPath = import_path3.default.join(projectPath, "package.json");
5953
- if (!import_fs.default.existsSync(packageJsonPath)) {
5954
- 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}`);
5955
5990
  }
5956
- const content = import_fs.default.readFileSync(packageJsonPath, "utf-8");
5957
- const pkg = JSON.parse(content);
5958
5991
  const allDeps = { ...pkg.dependencies, ...pkg.devDependencies };
5959
5992
  const detectedTechs = [];
5960
5993
  Object.keys(allDeps).forEach((dep) => {
@@ -6093,8 +6126,8 @@ function updateRootReadme(projects) {
6093
6126
  return;
6094
6127
  }
6095
6128
  let readmeContent = import_fs.default.readFileSync(readmePath, "utf-8");
6096
- const startMarker = "<!-- STACKSYNC_START -->";
6097
- const endMarker = "<!-- STACKSYNC_END -->";
6129
+ const startMarker = "<!-- STACKSCAN_START -->";
6130
+ const endMarker = "<!-- STACKSCAN_END -->";
6098
6131
  let newSection = `${startMarker}
6099
6132
  ## My Projects
6100
6133
 
@@ -6237,8 +6270,8 @@ function updateRootReadme2(projects) {
6237
6270
  return;
6238
6271
  }
6239
6272
  let readmeContent = import_fs2.default.readFileSync(readmePath, "utf-8");
6240
- const startMarker = "<!-- STACKSYNC_START -->";
6241
- const endMarker = "<!-- STACKSYNC_END -->";
6273
+ const startMarker = "<!-- STACKSCAN_START -->";
6274
+ const endMarker = "<!-- STACKSCAN_END -->";
6242
6275
  let newSection = `${startMarker}
6243
6276
  ## My Projects
6244
6277
 
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-7UBBON7U.mjs";
8
- import {
9
- sync
10
- } from "./chunk-C34SNVKF.mjs";
10
+ } from "./chunk-HT4RZGLE.mjs";
11
11
  import {
12
12
  techMap
13
- } from "./chunk-ZI6X666F.mjs";
13
+ } from "./chunk-SECL5E42.mjs";
14
14
  import {
15
15
  techDefinitions
16
- } from "./chunk-QBOEIUY2.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,