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

Merge down to main #331

Merged
merged 191 commits into from
Jul 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
191 commits
Select commit Hold shift + click to select a range
08e136e
feat: change fallback mode to 'blocking' allow passing overrides in i…
claygriffiths Jan 15, 2021
c2f03f5
feat: Add getting started sidebar box to plugin settings page (#76)
nickcernis Jan 19, 2021
4bf826e
docs: Update README with more information about the framework
trevanhetzel Jan 19, 2021
4649e2a
docs: Improve secret key field description (#78)
nickcernis Jan 20, 2021
c7a96d2
fix: Replaced wpe_headless_domain_replacement_enabled() in rewrite ca…
rfmeier Jan 20, 2021
13bbf91
fix: Undefined index: preview_id
mindctrl Jan 20, 2021
ca09930
fix: phpcs
mindctrl Jan 20, 2021
732e046
Docs rework to use absolute URL paths (#83)
wjohnsto Jan 20, 2021
b819378
docs: Add deployment steps for wpe-headless plugin (#79)
nickcernis Jan 21, 2021
a770bc9
test: Added tests for content replacement functions and callbacks
mindctrl Jan 20, 2021
56ec73f
test: Moved duplicate wp_insert_post calls to setUp()
mindctrl Jan 20, 2021
84bf611
fix: Added optional operator to src attribute within EnqueuedStyleshe…
rfmeier Jan 21, 2021
8cbec8f
docs: Adjust “disable theme” label (#85)
nickcernis Jan 22, 2021
c2f6e50
fix: change Next to start on port 8080 (#82)
bengreeley Jan 22, 2021
d761371
feat: Updated for WordPress plugin release. (#88)
rfmeier Jan 22, 2021
6c95098
Update README.md (#89)
markkelnar Jan 25, 2021
df5dc59
feat: add graphql-code-gen
claygriffiths Jan 15, 2021
ffb716e
feat: migrate types over to generated types from WP GraphQL
claygriffiths Jan 22, 2021
aa59987
style: lint fixes
claygriffiths Jan 22, 2021
433253a
fix(BH-816): make redirect in initializeNextStaticProps dynamic
claygriffiths Jan 22, 2021
2e75807
build: add lint script in @wpengine/headless
claygriffiths Jan 25, 2021
3c6949e
style: lint fixes
claygriffiths Jan 25, 2021
eaf81c8
docs: add templating/README.md
claygriffiths Jan 25, 2021
1866095
docs: add getting-started/README.md
trevanhetzel Jan 25, 2021
b98ef60
docs: Update README with links to guides
trevanhetzel Jan 25, 2021
125fb5f
Add callback for content src= replacement (#90)
markkelnar Jan 26, 2021
c2d397b
feat: Add content modeling plugin skeleton
mindctrl Jan 25, 2021
04a5a25
Add phpunit config
mindctrl Jan 26, 2021
5349a7c
Feat/filter media src (#97)
markkelnar Jan 27, 2021
4c3e867
fix: Added WP_CLI check before redirecting user on WordPress plugin a…
rfmeier Jan 27, 2021
9c2bb8f
chore: bump Next.js to ^10.0.5 in preview example
claygriffiths Jan 27, 2021
35c677b
fix: use <div /> instead of <p /> for excerpt/content in example
claygriffiths Jan 27, 2021
20899ec
fix(BH-809): use Apollo hooks, extract GraphQL queries
claygriffiths Jan 27, 2021
4f665ea
fix: do not export resolveTemplate in /utils to reduce chance of Webp…
claygriffiths Jan 26, 2021
d986e6b
chore: bump @wpengine/headless to 0.4.0
claygriffiths Jan 27, 2021
0f92eb0
refactor: generate wpgraphql.d.ts instead of wpgraphql.ts
claygriffiths Jan 27, 2021
df56e01
ci: refactor plugin jobs and add content-model plugin (#102)
markkelnar Jan 28, 2021
537ae6b
test: End to end testing integration (#104)
rfmeier Jan 28, 2021
e46ec56
fix: resolve regressions with previews not working without client-sid…
claygriffiths Jan 28, 2021
90ff3d8
fix: run getContentNode if using front page to properly hydrate Apoll…
claygriffiths Jan 28, 2021
9e34326
feat: add page.tsx template to preview example
claygriffiths Jan 28, 2021
2028ec6
fix: update heading levels in preview example templates
claygriffiths Jan 29, 2021
bf39805
docs: Added documentation for end-2-end testing. (#107)
rfmeier Feb 1, 2021
a137a79
Cookies will only be persistent for a single request (#108)
wjohnsto Feb 1, 2021
9d0107e
chore: bump @wpengine/headless to 0.4.1
claygriffiths Feb 1, 2021
17f385c
feat: Added initial structure for registering custom content types an…
mindctrl Feb 1, 2021
33ee5eb
feat: Adjust domain replacement logic to remove header / query parame…
mindctrl Feb 2, 2021
ae2d0c8
fix: Use 302 redirects for public URLs (#113)
nickcernis Feb 2, 2021
f1c0bdd
style: Style and structure the example project (#109)
nickcernis Feb 3, 2021
412cbb0
Ci: package headless build (#111)
markkelnar Feb 3, 2021
e9e1d99
chore: remove 404 page template (#114)
nickcernis Feb 3, 2021
e9d0f34
fix: Change the way GraphQL auth callback checks HTTP_AUTHORIZATION (…
rfmeier Feb 3, 2021
4f235b1
chore: bump wpe-headless plugin to 0.4.1
claygriffiths Feb 3, 2021
b009ab8
feat: clone preview as getting-started (#117)
nickcernis Feb 3, 2021
9cd6a46
docs: update getting-started example readme (#118)
nickcernis Feb 4, 2021
b6fee56
Ci/add e2e test (#119)
markkelnar Feb 4, 2021
4c9ca5d
build: include src/types/wpgraphql.d.ts in published package
claygriffiths Feb 4, 2021
3a4b99a
chore: bump version to 0.4.3
claygriffiths Feb 4, 2021
b899c0a
chore: update @wpengine/headless in preview example
claygriffiths Feb 4, 2021
318937b
docs: Fixed link to post previews doc
mindctrl Feb 4, 2021
d772234
feat: Add "npm run clean" command (#125)
nickcernis Feb 8, 2021
524f992
refactor: use WPGraphQL types in Posts component (#124)
nickcernis Feb 8, 2021
b155b32
refactor: pass templates to TemplateLoader and Data Fetchers rather t…
claygriffiths Feb 8, 2021
da5e1d2
feat: make <TemplateLoader /> generic, add <NextTemplateLoader />
claygriffiths Feb 8, 2021
b7dbf20
refactor: update examples/preview to use wp-templates dir
claygriffiths Feb 8, 2021
08976ad
fix: return null in <TemplateLoader /> if page info is not provided
claygriffiths Feb 8, 2021
46402c7
fix: make templates param in Data Fetcher optional
claygriffiths Feb 8, 2021
ee7923a
docs: update docs to reflect <TemplateLoader /> changes
claygriffiths Feb 8, 2021
8833dc3
docs: Document the WPHead component (#128)
nickcernis Feb 9, 2021
5f3bbd5
docs: update examples to point to wp-templates/ instead of theme/
claygriffiths Feb 9, 2021
2d8e49b
fix: ensure WP stylesheets start with WP URL (#115)
nickcernis Feb 9, 2021
464f87c
fix: remove hash when querying GetUriInfo in useUriInfo()
claygriffiths Feb 9, 2021
014c1d6
chore: bump @wpengine/headless to 0.5.0
claygriffiths Feb 9, 2021
b6ebfa9
feat(BH-863): add support for previewing drafts (#122)
Feb 10, 2021
9e3ac37
fix: prevent 500 error on archives (#131)
nickcernis Feb 10, 2021
724d076
fix: WPE_HEADLESS_SECRET to WP_HEADLESS_SECRET (#134)
nickcernis Feb 10, 2021
d513e0e
docs (BH-829): Generate headless package docs with typedoc (#132)
nickcernis Feb 11, 2021
d56a5e7
Custom queries (#133)
wjohnsto Feb 12, 2021
8b292c3
chore: prep headless plugin 0.5 and package 0.6 (#136)
nickcernis Feb 12, 2021
85c6a19
chore: bump headless package to 0.6.0 in examples (#137)
nickcernis Feb 12, 2021
256dfd2
chore: correcting image link to be absolute (#138)
wjohnsto Feb 12, 2021
f498b13
docs: fix typo breaking a link in README (#140)
Feb 15, 2021
92c660d
docs: fix post preview link (#143)
ajitbohra Feb 16, 2021
d47e750
fix: Rewrite href nodes with the frontend URL (#99)
nickcernis Feb 16, 2021
cda4dd9
ci: npm publish job (#141)
markkelnar Feb 16, 2021
60cf37c
feat (BH-864): Add a category template to the getting-started example…
nickcernis Feb 16, 2021
1164837
fix: only returning revalidate for SSG (#142)
wjohnsto Feb 17, 2021
72747ad
fix (BH-897): Fetch six posts for the front page template (#147)
nickcernis Feb 18, 2021
d3c157a
Adjusting previews doc to work with latest framework features (#148)
wjohnsto Feb 18, 2021
9d32168
feat: Add wp-admin index page for content modeling.
mindctrl Feb 18, 2021
ec11b76
test: Add test for content model wp-admin page
mindctrl Feb 18, 2021
22e85dc
feat: Generate labels for custom post type registration.
mindctrl Feb 18, 2021
374e212
test: Add tests for generating custom post type labels.
mindctrl Feb 18, 2021
2b0d279
test: Update labels in example test data.
mindctrl Feb 18, 2021
23d119e
ci: Update phpcs configuration.
mindctrl Feb 18, 2021
27f6e55
feat: Pagination component (BH-856) and getting-started example (#154)
nickcernis Feb 24, 2021
2646621
fix: #152, exporting types from non-core modules (#153)
wjohnsto Feb 24, 2021
1289edd
ci: Install WPGraphQL plugin for phpunit tests.
mindctrl Feb 22, 2021
b915b61
feat: Register custom post types and fields with the WPGraphQL API
mindctrl Feb 22, 2021
251ef33
ci: Update PHP_CodeSniffer config to remove snake case requirement.
mindctrl Feb 22, 2021
fe8f030
chore: Remove debug code
mindctrl Feb 22, 2021
3ea1a35
test: Add test case for number/float field type.
mindctrl Feb 23, 2021
edac7c6
fix: Do not replace URLs in generalSettings query
nickcernis Feb 24, 2021
160ec90
Added to quickstart to populate front end url (#161)
matt-landers Feb 24, 2021
6827fbc
fix: improvements to the Posts getting-started component (#160)
nickcernis Feb 25, 2021
5c9f32c
feat: Point getting-started to a live demo URL for a faster new user …
nickcernis Feb 25, 2021
4c9e26c
chore: prep WP Engine Headless 0.5.1 and @wpengine/headless 0.6.1 for…
nickcernis Feb 25, 2021
b2149ae
chore: set examples to use @wpengine/headless 0.6.1 (#164)
nickcernis Feb 25, 2021
cc971d8
chore: Remove content model plugin and Circle CI config
mindctrl Feb 25, 2021
9d2c414
docs: Describe automated package release process (#169)
nickcernis Mar 2, 2021
bb6de3a
Update format for preview links (#167)
mindctrl Mar 2, 2021
96d7a86
chore: prep WP Engine Headless 0.5.2 and @wpengine/headless 0.6.2 for…
nickcernis Mar 2, 2021
5e60685
chore: Use @wpengine/headless 0.6.2 in examples (#172)
nickcernis Mar 2, 2021
b437636
Preview links work with configured site URL path (#173)
wjohnsto Mar 3, 2021
7ccf1b2
Prep WP Engine Headless 0.5.3 and @wpengine/headless 0.6.3 for releas…
nickcernis Mar 3, 2021
fe5d254
test: Codeception end-2-end integration (#159)
rfmeier Mar 3, 2021
eb84e26
chore: use @wpengine/headless 0.6.3 in examples (#176)
nickcernis Mar 3, 2021
946515d
DOCS: Initial Framework grammar and tone edits (#181)
narcher7 Mar 19, 2021
0ea3922
doc: adding space between of[Node] (#182)
wjohnsto Mar 24, 2021
eae43e6
test: Add phpunit tests for settings functions
mindctrl Mar 26, 2021
a913f0f
build(deps): bump elliptic in /examples/getting-started (#180)
dependabot[bot] Mar 26, 2021
0fcb6b2
build(deps): bump elliptic from 6.5.3 to 6.5.4 in /examples/preview (…
dependabot[bot] Mar 26, 2021
60b2e3e
build(deps): bump elliptic from 6.5.3 to 6.5.4 in /packages/headless …
dependabot[bot] Mar 26, 2021
811ca1a
chore: bump next to 10.0.9 (#184)
nickcernis Mar 26, 2021
a8235be
chore: bump lerna to 4.0.0 (#185)
nickcernis Mar 29, 2021
be63b07
chore: bump @wordpress/env to prevent mysql error
nickcernis Mar 29, 2021
8adad70
fix: prevent errors for JWT authenticated requests (#190)
nickcernis Apr 27, 2021
d054a00
chore: prepare release of WPE Headless 0.5.4 (#192)
nickcernis Apr 28, 2021
27732b0
Update CODEOWNERS to include developer-relations.
bdurette May 3, 2021
d2c1230
Removing Cypress (#196)
wjohnsto May 5, 2021
9c37303
build(deps): bump node-notifier in /packages/headless (#197)
dependabot[bot] May 5, 2021
bbffed1
build(deps): bump rmccue/requests in /plugins/wpe-headless (#193)
dependabot[bot] May 5, 2021
b7de70e
docs[repo](#201): adding basic contribution guidelines (#202)
wjohnsto May 7, 2021
6859d4f
build(deps): bump ua-parser-js in /packages/headless (#204)
dependabot[bot] May 11, 2021
f39d181
build(deps): bump handlebars from 4.7.6 to 4.7.7 in /packages/headles…
dependabot[bot] May 11, 2021
8fa4f75
build(deps): bump url-parse from 1.4.7 to 1.5.1 in /packages/headless…
dependabot[bot] May 11, 2021
9fff5cb
Contribution guidelines (#203)
wjohnsto May 11, 2021
85d3a37
build(deps): bump lodash in /examples/getting-started (#207)
dependabot[bot] May 11, 2021
3506bce
build(deps): bump lodash from 4.17.20 to 4.17.21 in /examples/preview…
dependabot[bot] May 11, 2021
016edd2
build(deps): bump lodash from 4.17.20 to 4.17.21 (#213)
dependabot[bot] May 11, 2021
5edadcd
build(deps): bump lodash from 4.17.20 to 4.17.21 in /packages/headles…
dependabot[bot] May 11, 2021
0bc2a2f
build(deps): bump hosted-git-info in /examples/getting-started (#211)
dependabot[bot] May 11, 2021
53d0724
build(deps): bump hosted-git-info in /examples/preview (#210)
dependabot[bot] May 11, 2021
9e69767
build(deps): bump hosted-git-info in /packages/headless (#209)
dependabot[bot] May 11, 2021
d64eb20
fix: lint fixes (#216)
wjohnsto May 13, 2021
07f628d
`core` broken out (#215)
wjohnsto May 13, 2021
e5fb7f8
feat: break out `react` package (#217)
blakewilson May 13, 2021
17f4ae4
feat: break out `next` package (#219)
blakewilson May 17, 2021
66159f5
Publish `core`, `react`, and `next` (#226)
wjohnsto May 18, 2021
182325c
ci: setting up linting automation (#222)
wjohnsto May 18, 2021
3efaec1
build(deps): bump wp-cli/wp-cli in /plugins/wpe-headless (#231)
dependabot[bot] May 20, 2021
631e176
docs: Next.js getting started example with decoupled packages (#237)
blakewilson May 21, 2021
b48bb61
refactor: remove re-exports from higher-level headless libs (#229)
blakewilson May 21, 2021
85b6b47
style: Use src directory in examples/next/getting-started (#242)
blakewilson May 25, 2021
e0fd646
refactor: remove nextConfig.js (#243)
blakewilson May 25, 2021
588647f
docs: update changelogs for 0.6.4-0.6.5 (#245)
blakewilson May 25, 2021
a8219b4
Tests: Create tests for Next package (#247)
blakewilson Jun 1, 2021
eeae5d6
Create tests for `core` package (#248)
wjohnsto Jun 1, 2021
05778d2
headless-plugin: do not rewrite post links in GraphQL response (#250)
nickcernis Jun 2, 2021
6adcb82
chore: prep Headless Plugin 0.5.5 for release (#251)
nickcernis Jun 2, 2021
38a422a
Tests: Create test for React package (#249)
blakewilson Jun 2, 2021
9f3746d
Add root-level scripts for linting and testing (#253)
wjohnsto Jun 2, 2021
1ce157e
chore: (#254) removing lerna, adding root scripts for bootstrapping (…
wjohnsto Jun 2, 2021
9bf7ac0
Add ESLint Ignore Patterns for IDE ESLint plugins (#257)
blakewilson Jun 2, 2021
8913950
chore: fixing refresh script to not install with a prefix (#258)
wjohnsto Jun 2, 2021
b08ec9c
fix: (#259) ESLint scripts on MacOS (#260)
blakewilson Jun 2, 2021
8b012dd
Removing apollo and adding gqless (#264)
wjohnsto Jun 9, 2021
c01f2b0
feat: (#262) add gqless to React package (#265)
blakewilson Jun 10, 2021
bb28213
fix: (#266) fix headlessConfig() setter (#267)
blakewilson Jun 11, 2021
2b81705
feat: resolve/infer URL from Next context (#263)
blakewilson Jun 11, 2021
92ce152
Gqless next implementation (#268)
wjohnsto Jun 11, 2021
baae0cc
feat: adding is404, exporting core client on react and next clients (…
wjohnsto Jun 14, 2021
66420a9
feat: (#278) create react example (#282)
blakewilson Jun 16, 2021
2120f82
fix: (#284) preview example alerts (#285)
blakewilson Jun 18, 2021
3eea712
Getting started migration (#283)
wjohnsto Jun 18, 2021
6d0a0ba
fix: (#284) glob-parent, normalize-url (#286)
blakewilson Jun 18, 2021
1ffa386
doc: (#287) using core types for pagination and posts (#288)
wjohnsto Jun 18, 2021
f884289
Dependabot fix (#291)
wjohnsto Jun 21, 2021
5095ee8
Custom client functionality (#295)
wjohnsto Jun 25, 2021
7245c60
fix: (#290) Replace node-sass with sass (#294)
blakewilson Jun 25, 2021
96e7849
chore: (#296) incrementing package versions (#297)
wjohnsto Jun 25, 2021
58b5127
Migrate react example 0.7 (#299)
blakewilson Jun 25, 2021
6cc8f0d
make: fix trim-newlines dependabot alert (#300)
blakewilson Jun 28, 2021
67ef7d9
Setting @faustjs as framework name (#319)
wjohnsto Jun 30, 2021
0d64c0d
docs: Initial docs setup for FaustJs (#320)
blakewilson Jun 30, 2021
1fb6ce5
docs: (#306) clean up CPT guide (#322)
blakewilson Jun 30, 2021
ab8edba
Reference doc for SSR and SSG (#323)
wjohnsto Jun 30, 2021
20c0788
doc: (#307) completing doc for hooks and fetching data (#328)
wjohnsto Jul 1, 2021
03beb79
doc: (#309) finishing 404 doc (#325)
wjohnsto Jul 1, 2021
a532b76
Refactor React Hooks (#330)
blakewilson Jul 1, 2021
55c22f1
Refactor `getNext...` and `is404` config (#329)
blakewilson Jul 1, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
125 changes: 78 additions & 47 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ version: 2.1
orbs:
wp-product-orb: wpengine/[email protected]
php: circleci/[email protected]
node: circleci/[email protected]

jobs:
checkout:
Expand All @@ -17,11 +18,16 @@ jobs:
paths:
- .

plugin-wpe-headless-checkout:
plugin-checkout:
executor: wp-product-orb/default
working_directory: ~/project/plugins/wpe-headless
working_directory: ~/project/plugins/<<parameters.slug>>
environment:
WPE_SESSION_DIR: ./.wpe
parameters:
slug:
type: string
filename:
type: string
steps:
- attach_workspace:
at: ~/project
Expand All @@ -30,19 +36,22 @@ jobs:
command: |
[ ! -d "build" ] && mkdir build &>/dev/null
- wp-product-orb/get-version-from-php:
filename: wpe-headless.php
filename: <<parameters.filename>>
return_var: BUILD_VERSION
- wp-product-orb/variable:
var: BUILD_VERSION
value: $BUILD_VERSION
- persist_to_workspace:
root: ~/project
paths:
- plugins/wpe-headless
- plugins/<<parameters.slug>>

plugin-wpe-headless-composer:
plugin-composer:
executor: php/default
working_directory: ~/project/plugins/wpe-headless
working_directory: ~/project/plugins/<<parameters.slug>>
parameters:
slug:
type: string
steps:
- attach_workspace:
at: ~/project
Expand All @@ -53,22 +62,26 @@ jobs:
name: Composer PHP lint and code sniffer
command: |
/usr/local/bin/composer lint && /usr/local/bin/composer phpcs
rm -v composer-setup.php
working_directory: .
- persist_to_workspace:
root: ~/project
paths:
- plugins/wpe-headless
- plugins/<<parameters.slug>>

plugin-wpe-headless-test:
working_directory: ~/project/plugins/wpe-headless
plugin-test:
working_directory: ~/project/plugins/<<parameters.slug>>
docker:
- image: cimg/php:7.4
- image: circleci/mysql:5.7
environment:
MYSQL_DATABASE: wpe_headless_tests
MYSQL_USER: wpe_headless_user
MYSQL_PASSWORD: wpe_headless_pass
MYSQL_DATABASE: wp_database
MYSQL_USER: wp_user
MYSQL_PASSWORD: wp_pass
MYSQL_ROOT_PASSWORD: password
parameters:
slug:
type: string
steps:
- attach_workspace:
at: ~/project
Expand All @@ -83,19 +96,22 @@ jobs:
- run:
name: Setup WordPress testing framework
command: |
/bin/bash tests/install-wp-tests.sh wpe_headless_tests wpe_headless_user wpe_headless_pass 127.0.0.1 latest true
/bin/bash tests/install-wp-tests.sh wp_database wp_user wp_pass 127.0.0.1 latest true
working_directory: .
- run:
name: Run testing suite
command: |
composer test
working_directory: .

plugin-wpe-headless-bundle-zip:
plugin-bundle-zip:
executor: wp-product-orb/default
working_directory: ~/project/plugins/wpe-headless
working_directory: ~/project/plugins/<<parameters.slug>>
environment:
WPE_SESSION_DIR: ./.wpe
parameters:
slug:
type: string
steps:
- attach_workspace:
at: ~/project
Expand All @@ -104,108 +120,123 @@ jobs:
name: "Bundle plugin files into a zip"
command: |
cd ..
zip --verbose -x@wpe-headless/.zipignore -x *.wpe/* */build/ -r "wpe-headless/build/wpe-headless.$BUILD_VERSION.zip" wpe-headless
zip --verbose -x@<<parameters.slug>>/.zipignore -x *.wpe/* */build/ -r "<<parameters.slug>>/build/<<parameters.slug>>.$BUILD_VERSION.zip" <<parameters.slug>>
- store_artifacts:
path: build
- persist_to_workspace:
root: ~/project
paths:
- plugins/wpe-headless/build
- plugins/<<parameters.slug>>/build

plugin-wpe-headless-bundle-json:
plugin-bundle-json:
executor: wp-product-orb/parser
working_directory: ~/project/plugins/wpe-headless
working_directory: ~/project/plugins/<<parameters.slug>>
environment:
WPE_SESSION_DIR: ./.wpe
parameters:
slug:
type: string
steps:
- attach_workspace:
at: ~/project
- wp-product-orb/variable-load
- wp-product-orb/parse-wp-readme:
infile: readme.txt
outfile: build/wpe-headless.$BUILD_VERSION.json
outfile: build/<<parameters.slug>>.$BUILD_VERSION.json
- store_artifacts:
path: build
- persist_to_workspace:
root: ~/project
paths:
- plugins/wpe-headless/build
- plugins/<<parameters.slug>>/build

plugin-wpe-headless-deploy:
plugin-deploy:
executor: wp-product-orb/authenticate
working_directory: ~/project/plugins/wpe-headless
working_directory: ~/project/plugins/<<parameters.slug>>
environment:
WPE_SESSION_DIR: ./.wpe
parameters:
auth_url:
type: string
upload_url:
type: string
slug:
type: string
steps:
- attach_workspace:
at: ~/project
- wp-product-orb/variable-load
- wp-product-orb/authenticate:
user: WPE_LDAP_USER
pass: WPE_LDAP_PASS
url: << parameters.auth_url >>
url: <<parameters.auth_url>>
- wp-product-orb/post-zip:
url: << parameters.upload_url >>/wpe-headless
zip: build/wpe-headless.$BUILD_VERSION.zip
json: build/wpe-headless.$BUILD_VERSION.json
url: <<parameters.upload_url>>/<<parameters.slug>>
zip: build/<<parameters.slug>>.$BUILD_VERSION.zip
json: build/<<parameters.slug>>.$BUILD_VERSION.json
version: $BUILD_VERSION

workflows:
version: 2

# Workflows defined for each package.
# Workflows defined for each package and plugin.
# tag example for deploying an update for wpe-headless: plugin/wpe-headless/1.0.0
plugin-wpe-headless:
jobs:
- checkout:
filters:
tags:
only: /.*/
- plugin-wpe-headless-checkout:
- plugin-checkout:
name: plugin-checkout-wpe-headless
slug: wpe-headless
filename: wpe-headless.php
requires:
- checkout
# Enable running this job when a tag is published
filters:
tags:
only: /.*/
- plugin-wpe-headless-composer:
- plugin-composer:
name: plugin-composer-wpe-headless
slug: wpe-headless
requires:
- plugin-wpe-headless-checkout
- plugin-checkout-wpe-headless
# Enable running this job when a tag is published
filters:
tags:
only: /.*/
- plugin-wpe-headless-test:
- plugin-test:
name: plugin-test-wpe-headless
slug: wpe-headless
requires:
- plugin-wpe-headless-composer
- plugin-composer-wpe-headless
# Enable running this job when a tag is published
filters:
tags:
only: /.*/
- plugin-wpe-headless-bundle-zip:
- plugin-bundle-zip:
name: plugin-bundle-zip-wpe-headless
slug: wpe-headless
requires:
- plugin-wpe-headless-test
- plugin-test-wpe-headless
# Run this job on every commit/PR so the plugin is available as a build artifact
filters:
tags:
only: /.*/
- plugin-wpe-headless-bundle-json:
- plugin-bundle-json:
name: plugin-bundle-json-wpe-headless
slug: wpe-headless
requires:
- plugin-wpe-headless-test
- plugin-test-wpe-headless
# Run this job on every commit/PR to make sure it's in working order prior to deploying
filters:
tags:
only: /.*/
- plugin-wpe-headless-deploy:
name: "Deploy zip to api (staging)"
- plugin-deploy:
name: "Deploy zip to api (staging) wpe-headless"
slug: wpe-headless
requires:
- plugin-wpe-headless-bundle-zip
- plugin-wpe-headless-bundle-json
- plugin-bundle-zip-wpe-headless
- plugin-bundle-json-wpe-headless
filters:
branches:
only:
Expand All @@ -216,11 +247,11 @@ workflows:
context: wpe-ldap-creds
auth_url: https://auth-staging.wpengine.io/v1/tokens
upload_url: https://wp-product-info-staging.wpesvc.net/v1/plugins
- plugin-wpe-headless-deploy:
name: "Deploy zip to api (production)"
- plugin-deploy:
name: "Deploy zip to api (production) wpe-headless"
slug: wpe-headless
requires:
- plugin-wpe-headless-bundle-zip
- plugin-wpe-headless-bundle-json
- "Deploy zip to api (staging) wpe-headless"
filters:
branches:
ignore: /.*/
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* @wpengine/blockheads
* @wpengine/developer-relations @wpengine/blockheads
/docs/ @wpengine/developer-relations @wpengine/blockheads
/examples/ @wpengine/developer-relations @wpengine/blockheads
/README.md @wpengine/developer-relations @wpengine/blockheads
22 changes: 8 additions & 14 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
name: ESLint
name: lint
on: pull_request
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Node Dependencies
run: yarn install
working-directory: packages/headless
env:
CI: TRUE
- name: Test Code Linting
run: yarn run eslint --output-file eslint_report.json --format json . --ext .js,.jsx,.ts,.tsx
working-directory: packages/headless
continue-on-error: true
- name: Annotate Code Linting Results
uses: ataylorme/[email protected]
- uses: actions/setup-node@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
report-json: "packages/headless/eslint_report.json"
node-version: '15'
- run: npm i -g npm@7 --registry=https://registry.npmjs.org
- run: npm install
- run: npm run build
- run: npm run lint
continue-on-error: FALSE
15 changes: 15 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: test
on: pull_request
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '15'
- run: npm i -g npm@7 --registry=https://registry.npmjs.org
- run: npm install
- run: npm run build
- run: npm test
continue-on-error: FALSE
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ dist
.idea
.DS_Store
process.yml
.vscode
4 changes: 0 additions & 4 deletions .graphqlconfig

This file was deleted.

8 changes: 8 additions & 0 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"core": "WordPress/WordPress#5.6",
"phpVersion": "7.4",
"plugins": [
"https://downloads.wordpress.org/plugin/wp-graphql.1.1.3.zip",
"./plugins/wpe-headless"
]
}
Loading