node-csfd-api-racintom 1.8.0 → 1.9.0

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 (111) hide show
  1. package/fetchers/fetch.polyfill.d.ts +1 -0
  2. package/fetchers/fetch.polyfill.js +9 -0
  3. package/fetchers/index.d.ts +1 -0
  4. package/fetchers/index.js +27 -0
  5. package/helpers/creator.helper.d.ts +17 -0
  6. package/helpers/creator.helper.js +87 -0
  7. package/helpers/global.helper.d.ts +17 -0
  8. package/helpers/global.helper.js +68 -0
  9. package/helpers/movie.helper.d.ts +26 -0
  10. package/helpers/movie.helper.js +270 -0
  11. package/helpers/search-user.helper.d.ts +5 -0
  12. package/helpers/search-user.helper.js +22 -0
  13. package/helpers/search.helper.d.ts +11 -0
  14. package/helpers/search.helper.js +62 -0
  15. package/helpers/user-ratings.helper.d.ts +13 -0
  16. package/helpers/user-ratings.helper.js +61 -0
  17. package/index.d.ts +24 -0
  18. package/index.js +39 -0
  19. package/interfaces/creator.interface.d.ts +12 -0
  20. package/interfaces/creator.interface.js +2 -0
  21. package/interfaces/global.d.ts +22 -0
  22. package/interfaces/global.js +2 -0
  23. package/interfaces/movie.interface.d.ts +73 -0
  24. package/interfaces/movie.interface.js +2 -0
  25. package/interfaces/search.interface.d.ts +27 -0
  26. package/interfaces/search.interface.js +2 -0
  27. package/interfaces/season.interface.d.ts +11 -0
  28. package/interfaces/season.interface.js +2 -0
  29. package/interfaces/user-ratings.interface.d.ts +18 -0
  30. package/interfaces/user-ratings.interface.js +2 -0
  31. package/package.json +62 -86
  32. package/services/creator.service.d.ts +6 -0
  33. package/services/creator.service.js +32 -0
  34. package/services/movie.service.d.ts +6 -0
  35. package/services/movie.service.js +59 -0
  36. package/services/search.service.d.ts +5 -0
  37. package/services/search.service.js +80 -0
  38. package/services/season.service.d.ts +9 -0
  39. package/services/season.service.js +43 -0
  40. package/services/user-ratings.service.d.ts +7 -0
  41. package/services/user-ratings.service.js +84 -0
  42. package/vars.d.ts +5 -0
  43. package/vars.js +13 -0
  44. package/.editorconfig +0 -13
  45. package/.eslintrc.json +0 -33
  46. package/.gitattributes +0 -2
  47. package/.github/FUNDING.yml +0 -8
  48. package/.github/pull_request_template.md +0 -19
  49. package/.github/workflows/main.yml +0 -40
  50. package/.github/workflows/publish.yml +0 -73
  51. package/.github/workflows/test.yml +0 -43
  52. package/.husky/pre-commit +0 -1
  53. package/.idea/codeStyles/Project.xml +0 -72
  54. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  55. package/.idea/inspectionProfiles/Project_Default.xml +0 -6
  56. package/.idea/misc.xml +0 -6
  57. package/.idea/modules.xml +0 -8
  58. package/.idea/node-csfd-api.iml +0 -9
  59. package/.idea/prettier.xml +0 -6
  60. package/.idea/vcs.xml +0 -7
  61. package/.nvmrc +0 -1
  62. package/.prettierignore +0 -8
  63. package/.prettierrc +0 -10
  64. package/.vscode/settings.json +0 -16
  65. package/Dockerfile +0 -19
  66. package/demo.ts +0 -35
  67. package/eslint.config.mjs +0 -55
  68. package/server.ts +0 -66
  69. package/src/fetchers/fetch.polyfill.ts +0 -7
  70. package/src/fetchers/index.ts +0 -25
  71. package/src/helpers/creator.helper.ts +0 -95
  72. package/src/helpers/global.helper.ts +0 -70
  73. package/src/helpers/movie.helper.ts +0 -276
  74. package/src/helpers/search-user.helper.ts +0 -19
  75. package/src/helpers/search.helper.ts +0 -66
  76. package/src/helpers/user-ratings.helper.ts +0 -62
  77. package/src/index.ts +0 -50
  78. package/src/interfaces/creator.interface.ts +0 -14
  79. package/src/interfaces/global.ts +0 -36
  80. package/src/interfaces/movie.interface.ts +0 -157
  81. package/src/interfaces/search.interface.ts +0 -32
  82. package/src/interfaces/season.interface.ts +0 -12
  83. package/src/interfaces/user-ratings.interface.ts +0 -21
  84. package/src/services/creator.service.ts +0 -34
  85. package/src/services/movie.service.ts +0 -89
  86. package/src/services/search.service.ts +0 -101
  87. package/src/services/season.service.ts +0 -55
  88. package/src/services/user-ratings.service.ts +0 -106
  89. package/src/vars.ts +0 -16
  90. package/tests/creator.test.ts +0 -182
  91. package/tests/fetchers.test.ts +0 -109
  92. package/tests/global.test.ts +0 -35
  93. package/tests/helpers.test.ts +0 -59
  94. package/tests/mocks/creator-actor.html.ts +0 -2244
  95. package/tests/mocks/creator-composer-empty.html.ts +0 -683
  96. package/tests/mocks/creator-director.html.ts +0 -3407
  97. package/tests/mocks/movie1.html.ts +0 -1430
  98. package/tests/mocks/movie2.html.ts +0 -740
  99. package/tests/mocks/movie3.html.ts +0 -1843
  100. package/tests/mocks/movie4.html.ts +0 -1568
  101. package/tests/mocks/search.html.ts +0 -838
  102. package/tests/mocks/series1.html.ts +0 -1540
  103. package/tests/mocks/userRatings.html.ts +0 -1354
  104. package/tests/movie.test.ts +0 -606
  105. package/tests/search.test.ts +0 -379
  106. package/tests/season.test.ts +0 -115
  107. package/tests/services.test.ts +0 -106
  108. package/tests/user-ratings.test.ts +0 -142
  109. package/tests/vars.test.ts +0 -34
  110. package/tsconfig.json +0 -23
  111. package/vitest.config.mts +0 -10
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SearchScraper = void 0;
4
+ const node_html_parser_1 = require("node-html-parser");
5
+ const fetchers_1 = require("../fetchers");
6
+ const global_helper_1 = require("../helpers/global.helper");
7
+ const search_user_helper_1 = require("../helpers/search-user.helper");
8
+ const search_helper_1 = require("../helpers/search.helper");
9
+ const vars_1 = require("../vars");
10
+ class SearchScraper {
11
+ async search(text) {
12
+ const url = (0, vars_1.searchUrl)(text);
13
+ const response = await (0, fetchers_1.fetchPage)(url);
14
+ const html = (0, node_html_parser_1.parse)(response);
15
+ const moviesNode = html.querySelectorAll('.main-movies article');
16
+ const usersNode = html.querySelectorAll('.main-users article');
17
+ const tvSeriesNode = html.querySelectorAll('.main-series article');
18
+ return this.parseSearch(moviesNode, usersNode, tvSeriesNode);
19
+ }
20
+ parseSearch(moviesNode, usersNode, tvSeriesNode) {
21
+ const movies = [];
22
+ const users = [];
23
+ const tvSeries = [];
24
+ moviesNode.map((m) => {
25
+ const url = (0, search_helper_1.getUrl)(m);
26
+ const movie = {
27
+ id: (0, global_helper_1.parseIdFromUrl)(url),
28
+ title: (0, search_helper_1.getTitle)(m),
29
+ year: (0, search_helper_1.getYear)(m),
30
+ url: `https://www.csfd.cz${url}`,
31
+ type: (0, search_helper_1.getType)(m),
32
+ colorRating: (0, search_helper_1.getColorRating)(m),
33
+ poster: (0, search_helper_1.getPoster)(m),
34
+ origins: (0, search_helper_1.getOrigins)(m),
35
+ creators: {
36
+ directors: (0, search_helper_1.parsePeople)(m, 'directors'),
37
+ actors: (0, search_helper_1.parsePeople)(m, 'actors')
38
+ }
39
+ };
40
+ movies.push(movie);
41
+ });
42
+ usersNode.map((m) => {
43
+ const url = (0, search_user_helper_1.getUserUrl)(m);
44
+ const user = {
45
+ id: (0, global_helper_1.parseIdFromUrl)(url),
46
+ user: (0, search_user_helper_1.getUser)(m),
47
+ userRealName: (0, search_user_helper_1.getUserRealName)(m),
48
+ avatar: (0, search_user_helper_1.getAvatar)(m),
49
+ url: `https://www.csfd.cz${url}`
50
+ };
51
+ users.push(user);
52
+ });
53
+ tvSeriesNode.map((m) => {
54
+ const url = (0, search_helper_1.getUrl)(m);
55
+ const user = {
56
+ id: (0, global_helper_1.parseIdFromUrl)(url),
57
+ title: (0, search_helper_1.getTitle)(m),
58
+ year: (0, search_helper_1.getYear)(m),
59
+ url: `https://www.csfd.cz${url}`,
60
+ type: (0, search_helper_1.getType)(m),
61
+ colorRating: (0, search_helper_1.getColorRating)(m),
62
+ poster: (0, search_helper_1.getPoster)(m),
63
+ origins: (0, search_helper_1.getOrigins)(m),
64
+ creators: {
65
+ directors: (0, search_helper_1.parsePeople)(m, 'directors'),
66
+ actors: (0, search_helper_1.parsePeople)(m, 'actors')
67
+ }
68
+ };
69
+ tvSeries.push(user);
70
+ });
71
+ const search = {
72
+ movies: movies,
73
+ users: users,
74
+ tvSeries: tvSeries,
75
+ creators: []
76
+ };
77
+ return search;
78
+ }
79
+ }
80
+ exports.SearchScraper = SearchScraper;
@@ -0,0 +1,9 @@
1
+ import { CSFDSeason } from '../interfaces/season.interface';
2
+ export declare class SeasonScraper {
3
+ season(url: string): Promise<CSFDSeason>;
4
+ private buildSeason;
5
+ private getOriginFromHtml;
6
+ private getDescriptionFromHtml;
7
+ private getThumbnailFromHtml;
8
+ private getEpisodeListFromHtml;
9
+ }
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SeasonScraper = void 0;
4
+ const fetchers_1 = require("../fetchers");
5
+ const node_html_parser_1 = require("node-html-parser");
6
+ const vars_1 = require("../vars");
7
+ class SeasonScraper {
8
+ async season(url) {
9
+ const response = await (0, fetchers_1.fetchPage)((0, vars_1.seasonUrl)(url));
10
+ const seasonHtml = (0, node_html_parser_1.parse)(response);
11
+ const movieNode = seasonHtml.querySelector('.main-movie-profile');
12
+ return this.buildSeason(movieNode);
13
+ }
14
+ buildSeason(movieNode) {
15
+ return {
16
+ origin: this.getOriginFromHtml(movieNode),
17
+ description: this.getDescriptionFromHtml(movieNode),
18
+ thumbnail: this.getThumbnailFromHtml(movieNode),
19
+ episodeList: this.getEpisodeListFromHtml(movieNode),
20
+ };
21
+ }
22
+ getOriginFromHtml(movieNode) {
23
+ return movieNode.querySelector('.film-info-content .origin').textContent;
24
+ }
25
+ getDescriptionFromHtml(movieNode) {
26
+ var _a;
27
+ return (_a = movieNode.querySelector('.plot-full')) === null || _a === void 0 ? void 0 : _a.textContent;
28
+ }
29
+ getThumbnailFromHtml(movieNode) {
30
+ return movieNode.querySelector('.film-posters img').getAttribute('src');
31
+ }
32
+ getEpisodeListFromHtml(movieNode) {
33
+ return movieNode.querySelectorAll('.film-episodes-list li').map(container => {
34
+ const nameContainer = container.querySelector('.film-title-name');
35
+ return {
36
+ name: nameContainer.textContent,
37
+ seasonEpisodeIdentifier: container.querySelector('.film-title-info').textContent,
38
+ linkToDetail: nameContainer.getAttribute('href'),
39
+ };
40
+ });
41
+ }
42
+ }
43
+ exports.SeasonScraper = SeasonScraper;
@@ -0,0 +1,7 @@
1
+ import { CSFDUserRatingConfig, CSFDUserRatings } from '../interfaces/user-ratings.interface';
2
+ export declare class UserRatingsScraper {
3
+ private films;
4
+ userRatings(user: string | number, config?: CSFDUserRatingConfig): Promise<CSFDUserRatings[]>;
5
+ private getPage;
6
+ private buildUserRatings;
7
+ }
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserRatingsScraper = void 0;
4
+ const node_html_parser_1 = require("node-html-parser");
5
+ const fetchers_1 = require("../fetchers");
6
+ const user_ratings_helper_1 = require("../helpers/user-ratings.helper");
7
+ const vars_1 = require("../vars");
8
+ class UserRatingsScraper {
9
+ constructor() {
10
+ this.films = [];
11
+ }
12
+ async userRatings(user, config) {
13
+ let allMovies = [];
14
+ const url = (0, vars_1.userRatingsUrl)(user);
15
+ const response = await (0, fetchers_1.fetchPage)(url);
16
+ const items = (0, node_html_parser_1.parse)(response);
17
+ const movies = items.querySelectorAll('.box-user-rating .table-container tbody tr');
18
+ // Get number of pages
19
+ const pagesNode = items.querySelector('.pagination');
20
+ const pages = +(pagesNode === null || pagesNode === void 0 ? void 0 : pagesNode.childNodes[pagesNode.childNodes.length - 4].rawText) || 1;
21
+ allMovies = this.getPage(config, movies);
22
+ if (config === null || config === void 0 ? void 0 : config.allPages) {
23
+ console.log('User', user, url);
24
+ console.log('Fetching all pages', pages);
25
+ for (let i = 2; i <= pages; i++) {
26
+ console.log('Fetching page', i, 'out of', pages, '...');
27
+ const url = (0, vars_1.userRatingsUrl)(user, i);
28
+ const response = await (0, fetchers_1.fetchPage)(url);
29
+ const items = (0, node_html_parser_1.parse)(response);
30
+ const movies = items.querySelectorAll('.box-user-rating .table-container tbody tr');
31
+ allMovies = [...this.getPage(config, movies)];
32
+ // Sleep
33
+ if (config.allPagesDelay) {
34
+ await (0, user_ratings_helper_1.sleep)(config.allPagesDelay);
35
+ }
36
+ }
37
+ return allMovies;
38
+ }
39
+ return allMovies;
40
+ }
41
+ getPage(config, movies) {
42
+ var _a, _b, _c, _d;
43
+ if (config) {
44
+ if (((_a = config.includesOnly) === null || _a === void 0 ? void 0 : _a.length) && ((_b = config.excludes) === null || _b === void 0 ? void 0 : _b.length)) {
45
+ console.warn(`node-csfd-api:
46
+ You can not use both parameters 'includesOnly' and 'excludes'.
47
+ Parameter 'includesOnly' will be used now:`, config.includesOnly);
48
+ }
49
+ }
50
+ for (const el of movies) {
51
+ const type = (0, user_ratings_helper_1.getType)(el);
52
+ // Filtering includesOnly
53
+ if ((_c = config === null || config === void 0 ? void 0 : config.includesOnly) === null || _c === void 0 ? void 0 : _c.length) {
54
+ if (config.includesOnly.some((include) => type === include)) {
55
+ this.buildUserRatings(el);
56
+ }
57
+ // Filter exludes
58
+ }
59
+ else if ((_d = config === null || config === void 0 ? void 0 : config.excludes) === null || _d === void 0 ? void 0 : _d.length) {
60
+ if (!config.excludes.some((exclude) => type === exclude)) {
61
+ this.buildUserRatings(el);
62
+ }
63
+ }
64
+ else {
65
+ // Without filtering
66
+ this.buildUserRatings(el);
67
+ }
68
+ }
69
+ return this.films;
70
+ }
71
+ buildUserRatings(el) {
72
+ this.films.push({
73
+ id: (0, user_ratings_helper_1.getId)(el),
74
+ title: (0, user_ratings_helper_1.getTitle)(el),
75
+ year: (0, user_ratings_helper_1.getYear)(el),
76
+ type: (0, user_ratings_helper_1.getType)(el),
77
+ url: (0, user_ratings_helper_1.getUrl)(el),
78
+ colorRating: (0, user_ratings_helper_1.getColorRating)(el),
79
+ userDate: (0, user_ratings_helper_1.getDate)(el),
80
+ userRating: (0, user_ratings_helper_1.getUserRating)(el)
81
+ });
82
+ }
83
+ }
84
+ exports.UserRatingsScraper = UserRatingsScraper;
package/vars.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ export declare const userRatingsUrl: (user: string | number, page?: number) => string;
2
+ export declare const movieUrl: (movie: number) => string;
3
+ export declare const creatorUrl: (creator: number | string) => string;
4
+ export declare const searchUrl: (text: string) => string;
5
+ export declare const seasonUrl: (url: string) => string;
package/vars.js ADDED
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.seasonUrl = exports.searchUrl = exports.creatorUrl = exports.movieUrl = exports.userRatingsUrl = void 0;
4
+ const userRatingsUrl = (user, page) => `https://www.csfd.cz/uzivatel/${encodeURIComponent(user)}/hodnoceni/${page ? '?page=' + page : ''}`;
5
+ exports.userRatingsUrl = userRatingsUrl;
6
+ const movieUrl = (movie) => `https://www.csfd.cz/film/${encodeURIComponent(movie)}/prehled/`;
7
+ exports.movieUrl = movieUrl;
8
+ const creatorUrl = (creator) => `https://www.csfd.cz/tvurce/${encodeURIComponent(creator)}`;
9
+ exports.creatorUrl = creatorUrl;
10
+ const searchUrl = (text) => `https://www.csfd.cz/hledat/?q=${encodeURIComponent(text)}`;
11
+ exports.searchUrl = searchUrl;
12
+ const seasonUrl = (url) => `https://www.csfd.cz/${url}`;
13
+ exports.seasonUrl = seasonUrl;
package/.editorconfig DELETED
@@ -1,13 +0,0 @@
1
- # editorconfig.org
2
- root = true
3
-
4
- [*]
5
- indent_style = space
6
- indent_size = 2
7
- end_of_line = lf
8
- charset = utf-8
9
- trim_trailing_whitespace = true
10
- insert_final_newline = true
11
-
12
- [*.md]
13
- trim_trailing_whitespace = false
package/.eslintrc.json DELETED
@@ -1,33 +0,0 @@
1
- {
2
- "env": {
3
- "browser": true,
4
- "es6": true,
5
- "node": true
6
- },
7
- "extends": ["google", "plugin:prettier/recommended"],
8
- "globals": {
9
- "Atomics": "readonly",
10
- "SharedArrayBuffer": "readonly"
11
- },
12
- "parser": "@typescript-eslint/parser",
13
- "parserOptions": {
14
- "ecmaVersion": 2018,
15
- "sourceType": "module"
16
- },
17
- "plugins": ["@typescript-eslint", "prettier"],
18
- "rules": {
19
- // disable googles JSDoc
20
- "require-jsdoc": "off",
21
- // no-unused vars for typescript config
22
- "no-unused-vars": "off",
23
- "@typescript-eslint/no-unused-vars": [
24
- "error",
25
- {
26
- "vars": "all",
27
- "args": "after-used",
28
- "ignoreRestSiblings": false
29
- }
30
- ],
31
- "prettier/prettier": "error"
32
- }
33
- }
package/.gitattributes DELETED
@@ -1,2 +0,0 @@
1
- yarn.lock -diff
2
- package-lock.json -diff
@@ -1,8 +0,0 @@
1
- # These are supported funding model platforms
2
-
3
- github: [bartholomej] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4
- patreon: # Replace with a single Patreon username
5
- open_collective: # Replace with a single Open Collective username
6
- ko_fi: bartholomej
7
- tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8
- custom: ['https://www.paypal.me/bartholomej']
@@ -1,19 +0,0 @@
1
- ## What's new and why I made this pull request?
2
-
3
- -
4
-
5
- ## Pull request type
6
-
7
- What kind of change does this PR introduce?
8
-
9
- ```
10
- [ ] Bugfix
11
- [ ] Feature
12
- [ ] Code style update (formatting, local variables)
13
- [ ] Refactoring (no functional changes, no api changes)
14
- [ ] Build related changes
15
- [ ] CI related changes
16
- [ ] Documentation content changes
17
- [ ] Tests
18
- [ ] Other
19
- ```
@@ -1,40 +0,0 @@
1
- name: Build
2
-
3
- on: [push]
4
-
5
- jobs:
6
- build:
7
- runs-on: ubuntu-latest
8
-
9
- steps:
10
- - uses: actions/checkout@v4
11
- - name: Use Node.js
12
- uses: actions/setup-node@v4
13
- with:
14
- node-version: 24
15
-
16
- - name: Cache node modules
17
- uses: actions/cache@v4
18
- with:
19
- path: node_modules
20
- key: ${{ runner.OS }}-build-${{ hashFiles('**/yarn.lock') }}
21
- restore-keys: |
22
- ${{ runner.OS }}-build-${{ env.cache-name }}-
23
- ${{ runner.OS }}-build-
24
- ${{ runner.OS }}-
25
-
26
- - name: Install dependencies
27
- run: yarn
28
-
29
- - name: Build app
30
- run: yarn build
31
-
32
- - name: Run tests
33
- run: yarn test:coverage
34
-
35
- - name: Upload coverage to Codecov
36
- uses: codecov/codecov-action@v5
37
- with:
38
- fail_ci_if_error: true
39
- env:
40
- CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
@@ -1,73 +0,0 @@
1
- name: Publish
2
-
3
- on:
4
- push:
5
- tags:
6
- - 'v*'
7
-
8
- jobs:
9
- build:
10
- runs-on: ubuntu-latest
11
-
12
- steps:
13
- - uses: actions/checkout@v4
14
- - name: Use Node.js
15
- uses: actions/setup-node@v4
16
- with:
17
- node-version: 24
18
- registry-url: 'https://registry.npmjs.org'
19
-
20
- - name: Cache node modules
21
- uses: actions/cache@v4
22
- with:
23
- path: node_modules
24
- key: ${{ runner.OS }}-build-${{ hashFiles('**/yarn.lock') }}
25
- restore-keys: |
26
- ${{ runner.OS }}-build-${{ env.cache-name }}-
27
- ${{ runner.OS }}-build-
28
- ${{ runner.OS }}-
29
-
30
- - name: Install dependencies
31
- run: yarn
32
-
33
- - name: Build app
34
- run: yarn build
35
-
36
- - name: Run tests
37
- run: yarn test:coverage
38
-
39
- - name: Upload coverage to Codecov
40
- uses: codecov/codecov-action@v5
41
- with:
42
- fail_ci_if_error: true
43
- env:
44
- CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
45
-
46
- - name: Publish NPM
47
- if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false
48
- run: cd dist && npm publish --access public
49
- env:
50
- NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
51
-
52
- - name: Publish NPM BETA
53
- if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == true
54
- run: cd dist && npm publish --access public --tag beta
55
- env:
56
- NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
57
-
58
- # - name: Set up package for GPR
59
- # run: yarn gpr:setup
60
-
61
- # - name: Use GPR
62
- # uses: actions/setup-node@master
63
- # with:
64
- # node-version: 13
65
- # registry-url: https://npm.pkg.github.com/
66
- # scope: 'bartholomej'
67
-
68
- # - name: Publish to GitHub Package Registry
69
- # run: |
70
- # cd dist
71
- # npm publish
72
- # env:
73
- # NODE_AUTH_TOKEN: ${{github.token}}
@@ -1,43 +0,0 @@
1
- name: Build && Test
2
-
3
- on:
4
- schedule:
5
- - cron: '0 9 * * TUE'
6
-
7
- jobs:
8
- build:
9
- runs-on: ubuntu-latest
10
-
11
- steps:
12
- - uses: actions/checkout@v4
13
- - name: Use Node.js
14
- uses: actions/setup-node@v4
15
- with:
16
- node-version: 24
17
-
18
- - name: Cache node modules
19
- uses: actions/cache@v4
20
- with:
21
- path: node_modules
22
- key: ${{ runner.OS }}-build-${{ hashFiles('**/yarn.lock') }}
23
- restore-keys: |
24
- ${{ runner.OS }}-build-${{ env.cache-name }}-
25
- ${{ runner.OS }}-build-
26
- ${{ runner.OS }}-
27
-
28
- - name: Install dependencies
29
- run: yarn
30
-
31
- - name: Build app
32
- run: yarn build
33
-
34
- - name: Build app
35
- run: yarn test:coverage
36
-
37
- - name: Upload coverage to Codecov
38
- uses: codecov/codecov-action@v5
39
- with:
40
- fail_ci_if_error: true
41
- verbose: true
42
- env:
43
- CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
package/.husky/pre-commit DELETED
@@ -1 +0,0 @@
1
- npx lint-staged
@@ -1,72 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <code_scheme name="Project" version="173">
3
- <HTMLCodeStyleSettings>
4
- <option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
5
- </HTMLCodeStyleSettings>
6
- <JSCodeStyleSettings version="0">
7
- <option name="FORCE_SEMICOLON_STYLE" value="true" />
8
- <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
9
- <option name="USE_DOUBLE_QUOTES" value="false" />
10
- <option name="FORCE_QUOTE_STYlE" value="true" />
11
- <option name="ENFORCE_TRAILING_COMMA" value="Remove" />
12
- <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
13
- <option name="SPACES_WITHIN_IMPORTS" value="true" />
14
- </JSCodeStyleSettings>
15
- <JavaCodeStyleSettings>
16
- <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
17
- <option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
18
- </JavaCodeStyleSettings>
19
- <TypeScriptCodeStyleSettings version="0">
20
- <option name="FORCE_SEMICOLON_STYLE" value="true" />
21
- <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
22
- <option name="USE_DOUBLE_QUOTES" value="false" />
23
- <option name="FORCE_QUOTE_STYlE" value="true" />
24
- <option name="ENFORCE_TRAILING_COMMA" value="Remove" />
25
- <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
26
- <option name="SPACES_WITHIN_IMPORTS" value="true" />
27
- </TypeScriptCodeStyleSettings>
28
- <VueCodeStyleSettings>
29
- <option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
30
- <option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
31
- </VueCodeStyleSettings>
32
- <codeStyleSettings language="CoffeeScript">
33
- <indentOptions>
34
- <option name="TAB_SIZE" value="4" />
35
- </indentOptions>
36
- </codeStyleSettings>
37
- <codeStyleSettings language="HTML">
38
- <option name="SOFT_MARGINS" value="100" />
39
- <indentOptions>
40
- <option name="INDENT_SIZE" value="2" />
41
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
42
- <option name="TAB_SIZE" value="2" />
43
- </indentOptions>
44
- </codeStyleSettings>
45
- <codeStyleSettings language="JavaScript">
46
- <option name="SOFT_MARGINS" value="100" />
47
- <indentOptions>
48
- <option name="INDENT_SIZE" value="2" />
49
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
50
- <option name="TAB_SIZE" value="2" />
51
- </indentOptions>
52
- </codeStyleSettings>
53
- <codeStyleSettings language="PHP">
54
- <option name="CLASS_BRACE_STYLE" value="1" />
55
- <option name="METHOD_BRACE_STYLE" value="1" />
56
- </codeStyleSettings>
57
- <codeStyleSettings language="TypeScript">
58
- <option name="SOFT_MARGINS" value="100" />
59
- <indentOptions>
60
- <option name="INDENT_SIZE" value="2" />
61
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
62
- <option name="TAB_SIZE" value="2" />
63
- </indentOptions>
64
- </codeStyleSettings>
65
- <codeStyleSettings language="Vue">
66
- <option name="SOFT_MARGINS" value="100" />
67
- <indentOptions>
68
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
69
- </indentOptions>
70
- </codeStyleSettings>
71
- </code_scheme>
72
- </component>
@@ -1,5 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <state>
3
- <option name="USE_PER_PROJECT_SETTINGS" value="true" />
4
- </state>
5
- </component>
@@ -1,6 +0,0 @@
1
- <component name="InspectionProjectProfileManager">
2
- <profile version="1.0">
3
- <option name="myName" value="Project Default" />
4
- <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
5
- </profile>
6
- </component>
package/.idea/misc.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
4
- <output url="file://$PROJECT_DIR$/out" />
5
- </component>
6
- </project>
package/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/node-csfd-api.iml" filepath="$PROJECT_DIR$/.idea/node-csfd-api.iml" />
6
- </modules>
7
- </component>
8
- </project>
@@ -1,9 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="JAVA_MODULE" version="4">
3
- <component name="NewModuleRootManager" inherit-compiler-output="true">
4
- <exclude-output />
5
- <content url="file://$MODULE_DIR$" />
6
- <orderEntry type="inheritedJdk" />
7
- <orderEntry type="sourceFolder" forTests="false" />
8
- </component>
9
- </module>
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="PrettierConfiguration">
4
- <option name="myConfigurationMode" value="AUTOMATIC" />
5
- </component>
6
- </project>
package/.idea/vcs.xml DELETED
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="" vcs="Git" />
5
- <mapping directory="$PROJECT_DIR$" vcs="Git" />
6
- </component>
7
- </project>
package/.nvmrc DELETED
@@ -1 +0,0 @@
1
- 24
package/.prettierignore DELETED
@@ -1,8 +0,0 @@
1
- package.json
2
- package-lock.json
3
- yarn.lock
4
- prettier.config.js
5
- .eslintrc.js
6
- dist
7
- .vscode/*
8
- tests/mocks/*.html
package/.prettierrc DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "printWidth": 100,
3
- "singleQuote": true,
4
- "useTabs": false,
5
- "tabWidth": 2,
6
- "semi": true,
7
- "arrowParens": "always",
8
- "bracketSpacing": true,
9
- "trailingComma": "none"
10
- }