Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/sync api #44

Merged
merged 16 commits into from
May 18, 2022
Merged

Feature/sync api #44

merged 16 commits into from
May 18, 2022

Conversation

bezoerb
Copy link
Member

@bezoerb bezoerb commented May 16, 2022

Implements watch mode using the contentful sync api

Ben Zörb added 10 commits March 24, 2022 00:34
* main: (23 commits)
  chore(release): updated release notes and package versions [ci skip]
  fix(observable): uses ReplaySubject for transforms
  chore(release): updated release notes and package versions [ci skip]
  Fix: avoid skipping link entries in submenus (#42)
  chore(release): updated release notes and package versions [ci skip]
  Fix: avoid skipping link entries in menus builder (#41)
  ci(tests): disable shallow clone in github actions workflow
  ci(tests): tweaks coverage exclusions in sonar.properties
  ci(tests): tweaks sonar.properties
  ci(tests): tweaks sonar.properties
  ci(tests): tweaks sonar.properties
  ci(tests): tweaks sonar properties
  ci(tests): adds sonarcloud to test.yml (#40)
  fix(tests): adds sonar reporter
  ci(tests): adds sonarqube to test.yml
  chore(release): updated release notes and package versions [ci skip]
  feat(utils): adds waitFor util (#39)
  chore(release): updated release notes and package versions [ci skip]
  Feature: enable custom hugo menu (#38)
  chore(release): updated release notes and package versions [ci skip]
  ...
Copy link
Contributor

@tharders tharders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ein paar Sachen sind mir aufgefallen.
Lass uns dazu gerne auch noch mal sprechen


export const fetch = async (context: RuntimeContext, config: Config) => {
const content = await getContent(config as ContentfulConfig);
const { locales, contentTypes } = content;

// Add entries linked to deleted assets & entries to the list of changed entries
const additionalEntriesPromise = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Müsste additionalEntriesPromises sein (Mehrzahl)

return join(directory, filename);
};

export const write = async (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So viel Änderungen und keine Änderung am Test?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

an den tests bin ich noch dran ;)

packages/contentful-ssg/src/tasks/fetch.ts Show resolved Hide resolved
packages/contentful-ssg/src/server/index.ts Outdated Show resolved Hide resolved
packages/contentful-ssg/src/cli.ts Outdated Show resolved Hide resolved
packages/contentful-ssg/src/cli.ts Outdated Show resolved Hide resolved
@@ -105,6 +105,7 @@
"@endemolshinegroup/cosmiconfig-typescript-loader": "^3.0.2",
"@iarna/toml": "^2.2.5",
"@swc-node/register": "^1.4.0",
"async-exit-hook": "^2.0.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Die lib ist nicht mehr maintained. :-(
Da sie keine Dependencies hat ist das nicht ganz so schlimm, aber in der Beschreibung steht was, dass das auf Windows noch nicht so richtig supported wird.
Wir können auch im Auge behalten, dass das originale 'exit-hook' vielleicht bald async exit hooks erlaubt sindresorhus/exit-hook#20

packages/contentful-ssg/src/cli.ts Show resolved Hide resolved
packages/contentful-ssg/src/lib/contentful.ts Outdated Show resolved Hide resolved
packages/contentful-ssg/src/lib/contentful.ts Show resolved Hide resolved
@bezoerb bezoerb changed the base branch from main to next May 18, 2022 09:01
@sonarcloud
Copy link

sonarcloud bot commented May 18, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 10 Code Smells

85.5% 85.5% Coverage
0.0% 0.0% Duplication

@bezoerb bezoerb merged commit d8ea089 into next May 18, 2022
@bezoerb bezoerb deleted the feature/sync-api branch May 18, 2022 13:57
bezoerb pushed a commit that referenced this pull request May 18, 2022
* next:
  Feature/sync api (#44)
  chore(release): updated release notes and package versions [ci skip]
  fix(types): export ignore type directly from package
  fix(hugo-menu): handle pagerefs for link content types (#45)
bezoerb added a commit that referenced this pull request Jun 21, 2022
* Feature/sync api (#44)

* feat: add watch mode

* feat(watch): adds watch server + auto-hook

* fix(watch): pass all observables & entries to subsequent calls

* feat(watch): remove files for deleted entries in watch mode

* fix(watch): cleanup

* docs(watch): adds watch documentation to readme

* fix(watch): removes default x-powered-by header from express

* test(watch): adds tests

* test(watch): fix linter

* test(watch): adds tests

* fix(watch): don't process.exit in watch mode

* test(watcher): adds tests

* fix(watch): removes debug log

* fix(types): removes duplicate type

* ci: refactores jest & typescript config

* ci(monorepo): adds turborepo

* test(cssg-plugin-assets): adds test for assets plugin

* fix: bumps fs-extra

* fix(cssg-plugin-assets): adds contentful-ssg devdependency

* Feature/turborepo (#46)

* ci: refactores jest & typescript config

* ci(monorepo): adds turborepo

* test(cssg-plugin-assets): adds test for assets plugin

* fix: bumps fs-extra

* fix(cssg-plugin-assets): adds contentful-ssg devdependency

* ci: tweaks sonarcloud settings

* test(contentful-fakes): adds tests for contentful-fakes

* test(contentdul-fakes): adds tests

* fix(watcher): fix port when url is passed

* chore(release): updated release notes and package versions [ci skip]

* fix: tweak turbo.json

* style: trigger rebuild

* chore(release): updated release notes and package versions [ci skip]

* test(cssg-plugin-assets): adds some tests

* fix(sonar): adds cobertura coverage reporter

* ci(sonar): tweaks sonar settings

* ci(sonar): try sonar.flex.cobertura.reportPaths

* fix(test): adds missing coverage reporters

* ci(sonar): tweak properties

* ci(sonar): adds index.js to cssg-plugin-assets tsconfig.json

* fix(watcher): adds option to overwrite watch port

* fix(test): without crypto

* fix(watch): use crypto for webhook id

* chore(release): updated release notes and package versions [ci skip]

* ci(sonar): debug coverage

* fix(sonar): fix coverage stats

* fix(contentful): prefer sha1 over md5

* fix(watcher): allow url & port to be set via environment variable

* chore(release): updated release notes and package versions [ci skip]

* chore(release): updated release notes and package versions [ci skip]

* fix(watcher): use url from environment variable

* chore(release): updated release notes and package versions [ci skip]

* Feature/video poster (#47)

* style(eslint): adds xo-typescript/space & plugin:prettier/recommended

* chore(release): updated release notes and package versions [ci skip]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants