@netlify/build-info 6.2.1 → 6.2.3-rc.1

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 (152) hide show
  1. package/bin.js +1 -1
  2. package/lib/src/browser/file-system.d.ts +25 -0
  3. package/lib/src/browser/file-system.js +70 -0
  4. package/lib/src/build-systems/bazel.d.ts +7 -0
  5. package/lib/src/build-systems/bazel.js +15 -0
  6. package/lib/src/build-systems/buck.d.ts +7 -0
  7. package/lib/src/build-systems/buck.js +15 -0
  8. package/lib/src/build-systems/build-system.d.ts +29 -0
  9. package/lib/src/build-systems/build-system.js +25 -0
  10. package/lib/src/build-systems/gradle.d.ts +7 -0
  11. package/lib/src/build-systems/gradle.js +15 -0
  12. package/lib/src/build-systems/index.d.ts +2 -0
  13. package/lib/src/build-systems/index.js +11 -0
  14. package/lib/src/build-systems/lage.d.ts +6 -0
  15. package/lib/src/build-systems/lage.js +6 -0
  16. package/lib/src/build-systems/moon.d.ts +7 -0
  17. package/lib/src/build-systems/moon.js +18 -0
  18. package/lib/src/build-systems/nix.d.ts +7 -0
  19. package/lib/src/build-systems/nix.js +15 -0
  20. package/lib/src/build-systems/nrwl.d.ts +16 -0
  21. package/lib/src/build-systems/nrwl.js +55 -0
  22. package/lib/src/build-systems/pants.d.ts +7 -0
  23. package/lib/src/build-systems/pants.js +15 -0
  24. package/lib/src/build-systems/rush.d.ts +6 -0
  25. package/lib/src/build-systems/rush.js +6 -0
  26. package/lib/src/build-systems/turbo.d.ts +6 -0
  27. package/lib/src/build-systems/turbo.js +6 -0
  28. package/lib/src/file-system.d.ts +54 -0
  29. package/lib/src/file-system.js +160 -0
  30. package/lib/src/frameworks/angular.d.ts +24 -0
  31. package/lib/src/frameworks/angular.js +22 -0
  32. package/lib/src/frameworks/assemble.d.ts +16 -0
  33. package/lib/src/frameworks/assemble.js +16 -0
  34. package/lib/src/frameworks/astro.d.ts +25 -0
  35. package/lib/src/frameworks/astro.js +23 -0
  36. package/lib/src/frameworks/blitz.d.ts +23 -0
  37. package/lib/src/frameworks/blitz.js +21 -0
  38. package/lib/src/frameworks/brunch.d.ts +24 -0
  39. package/lib/src/frameworks/brunch.js +22 -0
  40. package/lib/src/frameworks/cecil.d.ts +23 -0
  41. package/lib/src/frameworks/cecil.js +21 -0
  42. package/lib/src/frameworks/docpad.d.ts +18 -0
  43. package/lib/src/frameworks/docpad.js +16 -0
  44. package/lib/src/frameworks/docusaurus.d.ts +30 -0
  45. package/lib/src/frameworks/docusaurus.js +44 -0
  46. package/lib/src/frameworks/eleventy.d.ts +24 -0
  47. package/lib/src/frameworks/eleventy.js +22 -0
  48. package/lib/src/frameworks/ember.d.ts +24 -0
  49. package/lib/src/frameworks/ember.js +22 -0
  50. package/lib/src/frameworks/expo.d.ts +24 -0
  51. package/lib/src/frameworks/expo.js +22 -0
  52. package/lib/src/frameworks/framework.d.ts +84 -0
  53. package/lib/src/frameworks/framework.js +89 -0
  54. package/lib/src/frameworks/gatsby.d.ts +32 -0
  55. package/lib/src/frameworks/gatsby.js +44 -0
  56. package/lib/src/frameworks/gridsome.d.ts +24 -0
  57. package/lib/src/frameworks/gridsome.js +22 -0
  58. package/lib/src/frameworks/grunt.d.ts +16 -0
  59. package/lib/src/frameworks/grunt.js +16 -0
  60. package/lib/src/frameworks/gulp.d.ts +16 -0
  61. package/lib/src/frameworks/gulp.js +16 -0
  62. package/lib/src/frameworks/harp.d.ts +23 -0
  63. package/lib/src/frameworks/harp.js +21 -0
  64. package/lib/src/frameworks/hexo.d.ts +24 -0
  65. package/lib/src/frameworks/hexo.js +22 -0
  66. package/lib/src/frameworks/hugo.d.ts +23 -0
  67. package/lib/src/frameworks/hugo.js +21 -0
  68. package/lib/src/frameworks/hydrogen.d.ts +23 -0
  69. package/lib/src/frameworks/hydrogen.js +21 -0
  70. package/lib/src/frameworks/index.d.ts +5 -0
  71. package/lib/src/frameworks/index.js +95 -0
  72. package/lib/src/frameworks/jekyll.d.ts +23 -0
  73. package/lib/src/frameworks/jekyll.js +21 -0
  74. package/lib/src/frameworks/metalsmith.d.ts +16 -0
  75. package/lib/src/frameworks/metalsmith.js +16 -0
  76. package/lib/src/frameworks/middleman.d.ts +23 -0
  77. package/lib/src/frameworks/middleman.js +21 -0
  78. package/lib/src/frameworks/next.d.ts +24 -0
  79. package/lib/src/frameworks/next.js +32 -0
  80. package/lib/src/frameworks/nuxt.d.ts +25 -0
  81. package/lib/src/frameworks/nuxt.js +40 -0
  82. package/lib/src/frameworks/parcel.d.ts +23 -0
  83. package/lib/src/frameworks/parcel.js +21 -0
  84. package/lib/src/frameworks/phenomic.d.ts +23 -0
  85. package/lib/src/frameworks/phenomic.js +21 -0
  86. package/lib/src/frameworks/quasar.d.ts +25 -0
  87. package/lib/src/frameworks/quasar.js +36 -0
  88. package/lib/src/frameworks/qwik.d.ts +23 -0
  89. package/lib/src/frameworks/qwik.js +24 -0
  90. package/lib/src/frameworks/react-static.d.ts +24 -0
  91. package/lib/src/frameworks/react-static.js +22 -0
  92. package/lib/src/frameworks/react.d.ts +30 -0
  93. package/lib/src/frameworks/react.js +16 -0
  94. package/lib/src/frameworks/redwoodjs.d.ts +25 -0
  95. package/lib/src/frameworks/redwoodjs.js +26 -0
  96. package/lib/src/frameworks/remix.d.ts +20 -0
  97. package/lib/src/frameworks/remix.js +20 -0
  98. package/lib/src/frameworks/roots.d.ts +23 -0
  99. package/lib/src/frameworks/roots.js +21 -0
  100. package/lib/src/frameworks/sapper.d.ts +24 -0
  101. package/lib/src/frameworks/sapper.js +22 -0
  102. package/lib/src/frameworks/solid-start.d.ts +23 -0
  103. package/lib/src/frameworks/solid-start.js +21 -0
  104. package/lib/src/frameworks/solid.d.ts +24 -0
  105. package/lib/src/frameworks/solid.js +22 -0
  106. package/lib/src/frameworks/stencil.d.ts +28 -0
  107. package/lib/src/frameworks/stencil.js +26 -0
  108. package/lib/src/frameworks/svelte-kit.d.ts +24 -0
  109. package/lib/src/frameworks/svelte-kit.js +22 -0
  110. package/lib/src/frameworks/svelte.d.ts +25 -0
  111. package/lib/src/frameworks/svelte.js +23 -0
  112. package/lib/src/frameworks/vite.d.ts +24 -0
  113. package/lib/src/frameworks/vite.js +22 -0
  114. package/lib/src/frameworks/vue.d.ts +23 -0
  115. package/lib/src/frameworks/vue.js +21 -0
  116. package/lib/src/frameworks/vuepress.d.ts +23 -0
  117. package/lib/src/frameworks/vuepress.js +21 -0
  118. package/lib/src/frameworks/wintersmith.d.ts +24 -0
  119. package/lib/src/frameworks/wintersmith.js +22 -0
  120. package/lib/src/frameworks/wmr.d.ts +23 -0
  121. package/lib/src/frameworks/wmr.js +21 -0
  122. package/lib/src/frameworks/zola.d.ts +18 -0
  123. package/lib/src/frameworks/zola.js +16 -0
  124. package/lib/src/index.d.ts +2 -0
  125. package/lib/src/index.js +2 -0
  126. package/lib/{bin.js → src/node/bin.js} +4 -3
  127. package/lib/src/node/file-system.d.ts +19 -0
  128. package/lib/src/node/file-system.js +60 -0
  129. package/lib/src/node/get-build-info.d.ts +20 -0
  130. package/lib/src/node/get-build-info.js +47 -0
  131. package/lib/{detect-package-manager.d.ts → src/package-managers/detect-package-manager.d.ts} +4 -4
  132. package/lib/src/package-managers/detect-package-manager.js +82 -0
  133. package/lib/src/project.d.ts +53 -0
  134. package/lib/src/project.js +207 -0
  135. package/lib/src/workspaces/detect-workspace.d.ts +22 -0
  136. package/lib/src/workspaces/detect-workspace.js +61 -0
  137. package/lib/src/workspaces/get-workspace-packages.d.ts +20 -0
  138. package/lib/src/workspaces/get-workspace-packages.js +80 -0
  139. package/lib/tsconfig.build.tsbuildinfo +1 -0
  140. package/package.json +14 -10
  141. package/lib/context.d.ts +0 -11
  142. package/lib/context.js +0 -45
  143. package/lib/detect-build-system.d.ts +0 -5
  144. package/lib/detect-build-system.js +0 -145
  145. package/lib/detect-package-manager.js +0 -71
  146. package/lib/get-build-info.d.ts +0 -11
  147. package/lib/get-build-info.js +0 -34
  148. package/lib/index.d.ts +0 -1
  149. package/lib/index.js +0 -1
  150. package/lib/workspaces.d.ts +0 -22
  151. package/lib/workspaces.js +0 -56
  152. /package/lib/{bin.d.ts → src/node/bin.d.ts} +0 -0
@@ -0,0 +1,24 @@
1
+ import { BaseFramework, Category, Framework } from './framework.js';
2
+ export declare class Angular extends BaseFramework implements Framework {
3
+ id: string;
4
+ name: string;
5
+ configFiles: string[];
6
+ npmDependencies: string[];
7
+ category: Category;
8
+ dev: {
9
+ port: number;
10
+ command: string;
11
+ pollingStrategies: {
12
+ name: string;
13
+ }[];
14
+ };
15
+ build: {
16
+ command: string;
17
+ directory: string;
18
+ };
19
+ logo: {
20
+ default: string;
21
+ light: string;
22
+ dark: string;
23
+ };
24
+ }
@@ -0,0 +1,22 @@
1
+ import { BaseFramework, Category } from './framework.js';
2
+ export class Angular extends BaseFramework {
3
+ id = 'angular';
4
+ name = 'Angular';
5
+ configFiles = ['angular.json'];
6
+ npmDependencies = ['@angular/cli'];
7
+ category = Category.FrontendFramework;
8
+ dev = {
9
+ port: 4200,
10
+ command: 'ng serve',
11
+ pollingStrategies: [{ name: 'TCP' }, { name: 'HTTP' }],
12
+ };
13
+ build = {
14
+ command: 'ng build --prod',
15
+ directory: 'dist/',
16
+ };
17
+ logo = {
18
+ default: '/logos/angular/default.svg',
19
+ light: '/logos/angular/default.svg',
20
+ dark: '/logos/angular/default.svg',
21
+ };
22
+ }
@@ -0,0 +1,16 @@
1
+ import { BaseFramework, Category, Framework } from './framework.js';
2
+ export declare class Assemble extends BaseFramework implements Framework {
3
+ id: string;
4
+ name: string;
5
+ npmDependencies: string[];
6
+ category: Category;
7
+ build: {
8
+ command: string;
9
+ directory: string;
10
+ };
11
+ logo: {
12
+ default: string;
13
+ light: string;
14
+ dark: string;
15
+ };
16
+ }
@@ -0,0 +1,16 @@
1
+ import { BaseFramework, Category } from './framework.js';
2
+ export class Assemble extends BaseFramework {
3
+ id = 'assemble';
4
+ name = 'Assemble';
5
+ npmDependencies = ['assemble'];
6
+ category = Category.SSG;
7
+ build = {
8
+ command: 'grunt build',
9
+ directory: 'dist',
10
+ };
11
+ logo = {
12
+ default: '/logos/assemble/default.svg',
13
+ light: '/logos/assemble/default.svg',
14
+ dark: '/logos/assemble/default.svg',
15
+ };
16
+ }
@@ -0,0 +1,25 @@
1
+ import { BaseFramework, Category, Framework } from './framework.js';
2
+ export declare class Astro extends BaseFramework implements Framework {
3
+ id: string;
4
+ name: string;
5
+ configFiles: string[];
6
+ npmDependencies: string[];
7
+ category: Category;
8
+ staticAssetsDirectory: string;
9
+ dev: {
10
+ port: number;
11
+ command: string;
12
+ pollingStrategies: {
13
+ name: string;
14
+ }[];
15
+ };
16
+ build: {
17
+ command: string;
18
+ directory: string;
19
+ };
20
+ logo: {
21
+ default: string;
22
+ light: string;
23
+ dark: string;
24
+ };
25
+ }
@@ -0,0 +1,23 @@
1
+ import { BaseFramework, Category } from './framework.js';
2
+ export class Astro extends BaseFramework {
3
+ id = 'astro';
4
+ name = 'Astro';
5
+ configFiles = ['astro.config.mjs'];
6
+ npmDependencies = ['astro'];
7
+ category = Category.SSG;
8
+ staticAssetsDirectory = 'public';
9
+ dev = {
10
+ port: 3000,
11
+ command: 'astro dev',
12
+ pollingStrategies: [{ name: 'TCP' }, { name: 'HTTP' }],
13
+ };
14
+ build = {
15
+ command: 'astro build',
16
+ directory: 'dist',
17
+ };
18
+ logo = {
19
+ default: '/logos/astro/light.svg',
20
+ light: '/logos/astro/light.svg',
21
+ dark: '/logos/astro/dark.svg',
22
+ };
23
+ }
@@ -0,0 +1,23 @@
1
+ import { BaseFramework, Category, Framework } from './framework.js';
2
+ export declare class Blitz extends BaseFramework implements Framework {
3
+ id: string;
4
+ name: string;
5
+ npmDependencies: string[];
6
+ category: Category;
7
+ dev: {
8
+ command: string;
9
+ port: number;
10
+ pollingStrategies: {
11
+ name: string;
12
+ }[];
13
+ };
14
+ build: {
15
+ command: string;
16
+ directory: string;
17
+ };
18
+ logo: {
19
+ default: string;
20
+ light: string;
21
+ dark: string;
22
+ };
23
+ }
@@ -0,0 +1,21 @@
1
+ import { BaseFramework, Category } from './framework.js';
2
+ export class Blitz extends BaseFramework {
3
+ id = 'blitz';
4
+ name = 'Blitz.js';
5
+ npmDependencies = ['blitz'];
6
+ category = Category.SSG;
7
+ dev = {
8
+ command: 'blitz dev',
9
+ port: 3000,
10
+ pollingStrategies: [{ name: 'TCP' }],
11
+ };
12
+ build = {
13
+ command: 'blitz build',
14
+ directory: 'out',
15
+ };
16
+ logo = {
17
+ default: '/logos/blitz/light.svg',
18
+ light: '/logos/blitz/light.svg',
19
+ dark: '/logos/blitz/dark.svg',
20
+ };
21
+ }
@@ -0,0 +1,24 @@
1
+ import { BaseFramework, Category, Framework } from './framework.js';
2
+ export declare class Brunch extends BaseFramework implements Framework {
3
+ id: string;
4
+ name: string;
5
+ npmDependencies: string[];
6
+ configFiles: string[];
7
+ category: Category;
8
+ dev: {
9
+ command: string;
10
+ port: number;
11
+ pollingStrategies: {
12
+ name: string;
13
+ }[];
14
+ };
15
+ build: {
16
+ command: string;
17
+ directory: string;
18
+ };
19
+ logo: {
20
+ default: string;
21
+ light: string;
22
+ dark: string;
23
+ };
24
+ }
@@ -0,0 +1,22 @@
1
+ import { BaseFramework, Category } from './framework.js';
2
+ export class Brunch extends BaseFramework {
3
+ id = 'brunch';
4
+ name = 'Brunch';
5
+ npmDependencies = ['brunch'];
6
+ configFiles = ['brunch-config.js'];
7
+ category = Category.BuildTool;
8
+ dev = {
9
+ command: 'brunch watch --server',
10
+ port: 3333,
11
+ pollingStrategies: [{ name: 'TCP' }, { name: 'HTTP' }],
12
+ };
13
+ build = {
14
+ command: 'brunch build',
15
+ directory: 'public',
16
+ };
17
+ logo = {
18
+ default: '/logos/brunch/default.svg',
19
+ light: '/logos/brunch/default.svg',
20
+ dark: '/logos/brunch/default.svg',
21
+ };
22
+ }
@@ -0,0 +1,23 @@
1
+ import { BaseFramework, Category, Framework } from './framework.js';
2
+ export declare class Cecil extends BaseFramework implements Framework {
3
+ id: string;
4
+ name: string;
5
+ configFiles: string[];
6
+ category: Category;
7
+ dev: {
8
+ command: string;
9
+ port: number;
10
+ pollingStrategies: {
11
+ name: string;
12
+ }[];
13
+ };
14
+ build: {
15
+ command: string;
16
+ directory: string;
17
+ };
18
+ logo: {
19
+ default: string;
20
+ light: string;
21
+ dark: string;
22
+ };
23
+ }
@@ -0,0 +1,21 @@
1
+ import { BaseFramework, Category } from './framework.js';
2
+ export class Cecil extends BaseFramework {
3
+ id = 'cecil';
4
+ name = 'Cecil';
5
+ configFiles = ['config.yml'];
6
+ category = Category.SSG;
7
+ dev = {
8
+ command: 'cecil serve',
9
+ port: 8000,
10
+ pollingStrategies: [{ name: 'TCP' }, { name: 'HTTP' }],
11
+ };
12
+ build = {
13
+ command: 'cecil build',
14
+ directory: '_site',
15
+ };
16
+ logo = {
17
+ default: '/logos/cecil/default.svg',
18
+ light: '/logos/cecil/default.svg',
19
+ dark: '/logos/cecil/default.svg',
20
+ };
21
+ }
@@ -0,0 +1,18 @@
1
+ import { BaseFramework, Category, Framework } from './framework.js';
2
+ export declare class DocPad extends BaseFramework implements Framework {
3
+ id: string;
4
+ name: string;
5
+ npmDependencies: string[];
6
+ category: Category;
7
+ dev: {
8
+ command: string;
9
+ port: number;
10
+ pollingStrategies: {
11
+ name: string;
12
+ }[];
13
+ };
14
+ build: {
15
+ command: string;
16
+ directory: string;
17
+ };
18
+ }
@@ -0,0 +1,16 @@
1
+ import { BaseFramework, Category } from './framework.js';
2
+ export class DocPad extends BaseFramework {
3
+ id = 'docpad';
4
+ name = 'DocPad';
5
+ npmDependencies = ['docpad'];
6
+ category = Category.SSG;
7
+ dev = {
8
+ command: 'docpad run',
9
+ port: 9778,
10
+ pollingStrategies: [{ name: 'TCP' }, { name: 'HTTP' }],
11
+ };
12
+ build = {
13
+ command: 'docpad generate',
14
+ directory: 'out',
15
+ };
16
+ }
@@ -0,0 +1,30 @@
1
+ import { BaseFramework, Category, Framework, VerboseDetection } from './framework.js';
2
+ export declare class Docusaurus extends BaseFramework implements Framework {
3
+ id: string;
4
+ name: string;
5
+ configFiles: string[];
6
+ npmDependencies: string[];
7
+ category: Category;
8
+ staticAssetsDirectory: string;
9
+ dev: {
10
+ command: string;
11
+ port: number;
12
+ pollingStrategies: {
13
+ name: string;
14
+ }[];
15
+ };
16
+ build: {
17
+ command: string;
18
+ directory: string;
19
+ };
20
+ logo: {
21
+ default: string;
22
+ light: string;
23
+ dark: string;
24
+ };
25
+ env: {
26
+ BROWSER: string;
27
+ };
28
+ detect(): any;
29
+ isV1(detected: VerboseDetection): boolean;
30
+ }
@@ -0,0 +1,44 @@
1
+ import { BaseFramework, Category } from './framework.js';
2
+ export class Docusaurus extends BaseFramework {
3
+ id = 'docusaurus';
4
+ name = 'Docusaurus';
5
+ configFiles = [
6
+ 'docusaurus.config.js',
7
+ 'siteConfig.js', // v1
8
+ ];
9
+ npmDependencies = [
10
+ '@docusaurus/core',
11
+ 'docusaurus', // v1
12
+ ];
13
+ category = Category.SSG;
14
+ staticAssetsDirectory = 'static';
15
+ dev = {
16
+ command: 'docusaurus start',
17
+ port: 3000,
18
+ pollingStrategies: [{ name: 'TCP' }, { name: 'HTTP' }],
19
+ };
20
+ build = {
21
+ command: 'docusaurus build',
22
+ directory: 'build',
23
+ };
24
+ logo = {
25
+ default: '/logos/docusaurus/default.svg',
26
+ light: '/logos/docusaurus/default.svg',
27
+ dark: '/logos/docusaurus/default.svg',
28
+ };
29
+ env = { BROWSER: 'none' };
30
+ async detect() {
31
+ const detected = await super.detect(true);
32
+ if (detected) {
33
+ if (this.isV1(detected)) {
34
+ this.build.command = 'docusaurus-build';
35
+ this.build.directory = 'build/<project-name>';
36
+ this.dev.command = 'docusaurus-start';
37
+ }
38
+ return this;
39
+ }
40
+ }
41
+ isV1(detected) {
42
+ return detected.config?.endsWith('siteConfig.js') || detected.npmDependency?.name === 'docusaurus';
43
+ }
44
+ }
@@ -0,0 +1,24 @@
1
+ import { BaseFramework, Category, Framework } from './framework.js';
2
+ export declare class Eleventy extends BaseFramework implements Framework {
3
+ id: string;
4
+ name: string;
5
+ configFiles: string[];
6
+ npmDependencies: string[];
7
+ category: Category;
8
+ dev: {
9
+ command: string;
10
+ port: number;
11
+ pollingStrategies: {
12
+ name: string;
13
+ }[];
14
+ };
15
+ build: {
16
+ command: string;
17
+ directory: string;
18
+ };
19
+ logo: {
20
+ default: string;
21
+ light: string;
22
+ dark: string;
23
+ };
24
+ }
@@ -0,0 +1,22 @@
1
+ import { BaseFramework, Category } from './framework.js';
2
+ export class Eleventy extends BaseFramework {
3
+ id = 'eleventy';
4
+ name = 'Eleventy';
5
+ configFiles = ['.eleventy.js', 'eleventy.config.js', 'eleventy.config.cjs'];
6
+ npmDependencies = ['@11ty/eleventy'];
7
+ category = Category.SSG;
8
+ dev = {
9
+ command: 'eleventy --serve',
10
+ port: 8080,
11
+ pollingStrategies: [{ name: 'TCP' }, { name: 'HTTP' }],
12
+ };
13
+ build = {
14
+ command: 'eleventy',
15
+ directory: '_site',
16
+ };
17
+ logo = {
18
+ default: '/logos/eleventy/default.svg',
19
+ light: '/logos/eleventy/default.svg',
20
+ dark: '/logos/eleventy/default.svg',
21
+ };
22
+ }
@@ -0,0 +1,24 @@
1
+ import { BaseFramework, Category, Framework } from './framework.js';
2
+ export declare class Ember extends BaseFramework implements Framework {
3
+ id: string;
4
+ name: string;
5
+ configFiles: string[];
6
+ npmDependencies: string[];
7
+ category: Category;
8
+ dev: {
9
+ command: string;
10
+ port: number;
11
+ pollingStrategies: {
12
+ name: string;
13
+ }[];
14
+ };
15
+ build: {
16
+ command: string;
17
+ directory: string;
18
+ };
19
+ logo: {
20
+ default: string;
21
+ light: string;
22
+ dark: string;
23
+ };
24
+ }
@@ -0,0 +1,22 @@
1
+ import { BaseFramework, Category } from './framework.js';
2
+ export class Ember extends BaseFramework {
3
+ id = 'ember';
4
+ name = 'Ember.js';
5
+ configFiles = ['ember-cli-build.js'];
6
+ npmDependencies = ['ember-cli'];
7
+ category = Category.FrontendFramework;
8
+ dev = {
9
+ command: 'ember serve',
10
+ port: 4200,
11
+ pollingStrategies: [{ name: 'TCP' }, { name: 'HTTP' }],
12
+ };
13
+ build = {
14
+ command: 'ember build',
15
+ directory: 'dist',
16
+ };
17
+ logo = {
18
+ default: '/logos/ember/default.svg',
19
+ light: '/logos/ember/light.svg',
20
+ dark: '/logos/ember/dark.svg',
21
+ };
22
+ }
@@ -0,0 +1,24 @@
1
+ import { BaseFramework, Category, Framework } from './framework.js';
2
+ export declare class Expo extends BaseFramework implements Framework {
3
+ id: string;
4
+ name: string;
5
+ configFiles: string[];
6
+ npmDependencies: string[];
7
+ category: Category;
8
+ dev: {
9
+ command: string;
10
+ port: number;
11
+ pollingStrategies: {
12
+ name: string;
13
+ }[];
14
+ };
15
+ build: {
16
+ command: string;
17
+ directory: string;
18
+ };
19
+ logo: {
20
+ default: string;
21
+ light: string;
22
+ dark: string;
23
+ };
24
+ }
@@ -0,0 +1,22 @@
1
+ import { BaseFramework, Category } from './framework.js';
2
+ export class Expo extends BaseFramework {
3
+ id = 'expo';
4
+ name = 'Expo';
5
+ configFiles = ['app.json'];
6
+ npmDependencies = ['expo'];
7
+ category = Category.FrontendFramework;
8
+ dev = {
9
+ command: 'expo start --web',
10
+ port: 19006,
11
+ pollingStrategies: [{ name: 'TCP' }, { name: 'HTTP' }],
12
+ };
13
+ build = {
14
+ command: 'expo build:web',
15
+ directory: 'web-build',
16
+ };
17
+ logo = {
18
+ default: '/logos/expo/default.svg',
19
+ light: '/logos/expo/light.svg',
20
+ dark: '/logos/expo/dark.svg',
21
+ };
22
+ }
@@ -0,0 +1,84 @@
1
+ import type { PackageJson } from 'read-pkg';
2
+ import { SemVer } from 'semver';
3
+ import { Project } from '../project.js';
4
+ export declare enum Category {
5
+ FrontendFramework = "frontend_framework",
6
+ SSG = "static_site_generator",
7
+ BuildTool = "build_tool"
8
+ }
9
+ export type PollingStrategy = {
10
+ name: any;
11
+ };
12
+ export interface Framework {
13
+ project: Project;
14
+ id: string;
15
+ name: string;
16
+ category: Category;
17
+ configFiles: string[];
18
+ npmDependencies: string[];
19
+ excludedNpmDependencies?: string[];
20
+ version?: SemVer;
21
+ staticAssetsDirectory?: string;
22
+ dev?: {
23
+ command: string;
24
+ port?: number;
25
+ pollingStrategies?: PollingStrategy[];
26
+ };
27
+ build: {
28
+ command: string;
29
+ directory: string;
30
+ };
31
+ logo?: {
32
+ default: string;
33
+ light?: string;
34
+ dark?: string;
35
+ };
36
+ plugins: string[];
37
+ env: Record<string, string>;
38
+ detect(): Promise<Framework | undefined>;
39
+ }
40
+ export type VerboseDetection = {
41
+ npmDependency?: {
42
+ name: string;
43
+ version?: SemVer;
44
+ };
45
+ config?: string;
46
+ };
47
+ export declare abstract class BaseFramework {
48
+ /** The current project inside we want to detect the framework */
49
+ project: Project;
50
+ /** The location where the framework got detected */
51
+ path?: string | undefined;
52
+ id: string;
53
+ name: string;
54
+ category: Category;
55
+ version?: SemVer;
56
+ configFiles: string[];
57
+ npmDependencies: string[];
58
+ excludedNpmDependencies: string[];
59
+ plugins: string[];
60
+ env: {};
61
+ constructor(
62
+ /** The current project inside we want to detect the framework */
63
+ project: Project,
64
+ /** The location where the framework got detected */
65
+ path?: string | undefined);
66
+ /** check if the npmDependencies are used inside the provided package.json */
67
+ protected npmDependenciesUsed(pkgJSON: PackageJson): {
68
+ name: string;
69
+ version?: SemVer;
70
+ } | undefined;
71
+ /**
72
+ * Checks if the project is using a specific framework:
73
+ * - if `npmDependencies` is set, one of them must be present in then `package.json` `dependencies|devDependencies`
74
+ * - if `excludedNpmDependencies` is set, none of them must be present in the `package.json` `dependencies|devDependencies`
75
+ * - if `configFiles` is set, one of the files must exist
76
+ */
77
+ detect(): Promise<this | undefined>;
78
+ detect(verbose: true): Promise<VerboseDetection | undefined>;
79
+ /** This method will be called by the JSON.stringify */
80
+ toJSON(): {
81
+ name: string;
82
+ id: string;
83
+ };
84
+ }