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/issue 948 web api standardization #1045

Merged

Conversation

thescientist13
Copy link
Member

@thescientist13 thescientist13 commented Jan 18, 2023

Related Issue

resolves #948 / #949

Summary of Changes

  1. Adopt (most of) core to work with Web APIs URL / Request / Response
  2. Refactor all plugins to adopt above convention
  3. Updated all impacted documentation

TODOs

  1. Fix Windows compat - Feature/issue 948 web api standardization windows compat refactor #1047
  2. Refactor Request.clone / Response.clone, as it seems to cause this issue
    (node:81167) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. Use events.setMaxListeners() to increase limit
  3. Restore ETag middleware for develop command
  4. Documentation / Breaking Changes
    • greenwood.config.js
    • ResourceInterface (extensions, lifecycle signatures, util methods)
  5. Clean up / address TODOs and / or make tracking issues
  6. Convert / refactor init package (GFI) - refactor init package #1050
  7. static router spec undefined script and preload (build.config.static-router.spec.js) (GFI) - static router outputting a <script> tag with a path of /undefined (when an SSR route is present?) #1051
    <script type="module" src="/undefined"></script>
  8. <script> tag not closing for inline + none optimizations, like for Google Analytics? (GFI) - <script> tags using optimization attributes have a space before the closing bracket of the opening tag #1052
     <script >
       var getOutboundLink = function(url) {
         gtag('event', 'click', {
           'event_category': 'outbound',
           'event_label': url,
           'transport_type': 'beacon'
         });
       }
       window.dataLayer = window.dataLayer || [];
       function gtag(){dataLayer.push(arguments);}
       gtag('js', new Date());
       gtag('config', 'UA-117350131-1', { 'anonymize_ip': true });
     </script>

@thescientist13 thescientist13 added documentation Greenwood specific docs Plugins Greenwood Plugins CLI feature New feature or request labels Jan 18, 2023
@thescientist13 thescientist13 self-assigned this Jan 18, 2023
@thescientist13 thescientist13 marked this pull request as ready for review January 26, 2023 23:14
@thescientist13 thescientist13 added RFC Proposal and changes to workflows, architecture, APIs, etc and removed feature New feature or request labels Jan 27, 2023
@thescientist13 thescientist13 linked an issue Feb 4, 2023 that may be closed by this pull request
3 tasks
@thescientist13 thescientist13 force-pushed the feature/issue-948-web-api-standardization branch from eaa10a5 to a2eefc6 Compare February 5, 2023 01:02
@thescientist13 thescientist13 merged commit 27a2440 into release/0.28.0 Feb 5, 2023
@thescientist13 thescientist13 deleted the feature/issue-948-web-api-standardization branch February 5, 2023 01:28
thescientist13 added a commit that referenced this pull request Feb 7, 2023
* web standard APIs adoption

* update graph lifecyle to work with URLs

* web standards refactoring for Resource plugins resolve lifecycle

* refactoring develop command and serve resource lifecycle for standard plugins

* refactor standard plugin intercept lifecycle

* clean up

* restore app templating to standard HTML resource plugin

* WIP refactoring plugins for web standardization

* handle develop command middleware support for handling binary or text response types

* restore nested relative routes resolution and general standard plugin refactoring

* group greenwood plugins

* adapt intercept lifecycles for web standards signature

* adapt pre-render build lifecycle and refactor page serving and intercepting

* refactor build and optimize lifecycles

* refactor bundle and optimize lifecycles

* restore cleanupResources

* restore copy lifecyle and all of build command

* restore serve command and full website prerendering

* restore specs and fixing missed upgrades

* all CLI specs passing

* all core specs and plugins working

* getting package plugin specs passing

* getting package plugin specs passing

* getting package plugin specs passing

* getting package plugin specs passing

* all plugin specs passing

* update spec for content type

* exp CSS import specs passing

* exp JSON import specs passing

* clean up console logs

* resolve max listeners warning

* restore E-Tag middleware for development

* merged response bundling working

* restore optimized graphql behavior

* update docs

* fix specs

* clean up TODOs

* docs revisions

* windows compat with fs.promises and URL

* develop command working

* convert to fs.promises

* build and serve refactored to fs.promises and URL

* all specs passing except for APIs

* all specs passing yay

* temp disable linting

* commands and almost all specs passing, phew

* refactor fs.access and fix lint

* restore linting to github actions

* resource and utils refactoring

* TODOs cleanup and tracking
thescientist13 added a commit that referenced this pull request Apr 9, 2023
* web standard APIs adoption

* update graph lifecyle to work with URLs

* web standards refactoring for Resource plugins resolve lifecycle

* refactoring develop command and serve resource lifecycle for standard plugins

* refactor standard plugin intercept lifecycle

* clean up

* restore app templating to standard HTML resource plugin

* WIP refactoring plugins for web standardization

* handle develop command middleware support for handling binary or text response types

* restore nested relative routes resolution and general standard plugin refactoring

* group greenwood plugins

* adapt intercept lifecycles for web standards signature

* adapt pre-render build lifecycle and refactor page serving and intercepting

* refactor build and optimize lifecycles

* refactor bundle and optimize lifecycles

* restore cleanupResources

* restore copy lifecyle and all of build command

* restore serve command and full website prerendering

* restore specs and fixing missed upgrades

* all CLI specs passing

* all core specs and plugins working

* getting package plugin specs passing

* getting package plugin specs passing

* getting package plugin specs passing

* getting package plugin specs passing

* all plugin specs passing

* update spec for content type

* exp CSS import specs passing

* exp JSON import specs passing

* clean up console logs

* resolve max listeners warning

* restore E-Tag middleware for development

* merged response bundling working

* restore optimized graphql behavior

* update docs

* fix specs

* clean up TODOs

* docs revisions

* windows compat with fs.promises and URL

* develop command working

* convert to fs.promises

* build and serve refactored to fs.promises and URL

* all specs passing except for APIs

* all specs passing yay

* temp disable linting

* commands and almost all specs passing, phew

* refactor fs.access and fix lint

* restore linting to github actions

* resource and utils refactoring

* TODOs cleanup and tracking
thescientist13 added a commit that referenced this pull request Apr 9, 2023
* web standard APIs adoption

* update graph lifecyle to work with URLs

* web standards refactoring for Resource plugins resolve lifecycle

* refactoring develop command and serve resource lifecycle for standard plugins

* refactor standard plugin intercept lifecycle

* clean up

* restore app templating to standard HTML resource plugin

* WIP refactoring plugins for web standardization

* handle develop command middleware support for handling binary or text response types

* restore nested relative routes resolution and general standard plugin refactoring

* group greenwood plugins

* adapt intercept lifecycles for web standards signature

* adapt pre-render build lifecycle and refactor page serving and intercepting

* refactor build and optimize lifecycles

* refactor bundle and optimize lifecycles

* restore cleanupResources

* restore copy lifecyle and all of build command

* restore serve command and full website prerendering

* restore specs and fixing missed upgrades

* all CLI specs passing

* all core specs and plugins working

* getting package plugin specs passing

* getting package plugin specs passing

* getting package plugin specs passing

* getting package plugin specs passing

* all plugin specs passing

* update spec for content type

* exp CSS import specs passing

* exp JSON import specs passing

* clean up console logs

* resolve max listeners warning

* restore E-Tag middleware for development

* merged response bundling working

* restore optimized graphql behavior

* update docs

* fix specs

* clean up TODOs

* docs revisions

* windows compat with fs.promises and URL

* develop command working

* convert to fs.promises

* build and serve refactored to fs.promises and URL

* all specs passing except for APIs

* all specs passing yay

* temp disable linting

* commands and almost all specs passing, phew

* refactor fs.access and fix lint

* restore linting to github actions

* resource and utils refactoring

* TODOs cleanup and tracking
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking CLI documentation Greenwood specific docs Plugins Greenwood Plugins RFC Proposal and changes to workflows, architecture, APIs, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Standardize on Web APIs (Request / Response / URL / etc)
1 participant