Skip to content

Commit 60e74ed

Browse files
authored
Issue 265 - Cache changes (#319)
* Issue 265 - Cache changes * Use long-form publish flags * More doc updates to long-form flags * One more line break * Move .test to .spec * Fix lint tsconfig
1 parent 2341db5 commit 60e74ed

23 files changed

+132
-227
lines changed

.github/workflows/ci.yml

Lines changed: 54 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -330,24 +330,25 @@ jobs:
330330
- name: Publish URL App to MicroApps
331331
run: |
332332
npx microapps-publish publish \
333-
-a blog \
334-
-t url \
335-
-n ${PACKAGE_VERSION} \
336-
-d ${DEPLOYER_LAMBDA_NAME} \
337-
-u https://www.pwrdrvr.com \
333+
--app-name blog \
334+
--type url \
335+
--new-version ${PACKAGE_VERSION} \
336+
--deployer-lambda-name ${DEPLOYER_LAMBDA_NAME} \
337+
--url https://www.pwrdrvr.com \
338338
--overwrite
339339
340340
- name: Publish Demo App to MicroApps
341341
run: |
342342
npx microapps-publish publish \
343-
-a ${DEMO_APP_NAME} \
344-
-t lambda-url \
343+
--app-name ${DEMO_APP_NAME} \
344+
--type lambda-url \
345345
--startup-type direct \
346-
-n ${PACKAGE_VERSION} \
347-
-d ${DEPLOYER_LAMBDA_NAME} \
348-
-l ${DEMO_APP_LAMBDA_NAME} \
349-
-s packages/demo-app/static_files \
350-
-i index.html --overwrite --noCache
346+
--new-version ${PACKAGE_VERSION} \
347+
--deployer-lambda-name ${DEPLOYER_LAMBDA_NAME} \
348+
--app-lambda-name ${DEMO_APP_LAMBDA_NAME} \
349+
--static-assets-path packages/demo-app/static_files \
350+
--default-file index.html \
351+
--overwrite
351352
352353
- name: Demo App URL
353354
uses: Sibz/github-status-action@v1
@@ -373,32 +374,36 @@ jobs:
373374
- name: Publish Demo App to MicroApps - To Delete
374375
run: |
375376
npx microapps-publish publish \
376-
-a ${DEMO_APP_NAME} \
377-
-t lambda-url \
377+
--app-name ${DEMO_APP_NAME} \
378+
--type lambda-url \
378379
--startup-type direct \
379-
-n 0.0.0-test.1 \
380-
-d ${DEPLOYER_LAMBDA_NAME} \
381-
-l ${DEMO_APP_LAMBDA_NAME} \
382-
-s packages/demo-app/static_files \
383-
-i index.html --overwrite --noCache
380+
--new-version 0.0.0-test.1 \
381+
--deployer-lambda-name ${DEPLOYER_LAMBDA_NAME} \
382+
--app-lambda-name ${DEMO_APP_LAMBDA_NAME} \
383+
--static-assets-path packages/demo-app/static_files \
384+
--default-file index.html \
385+
--overwrite \
386+
--no-cache
384387
385388
- name: Delete Demo App - To Delete
386389
run: |
387-
npx microapps-publish delete -a ${DEMO_APP_NAME} \
388-
-n 0.0.0-test.1 \
389-
-d ${DEPLOYER_LAMBDA_NAME}
390+
npx microapps-publish delete \
391+
--app-name ${DEMO_APP_NAME} \
392+
--new-version 0.0.0-test.1 \
393+
--deployer-lambda-name ${DEPLOYER_LAMBDA_NAME}
390394
391395
- name: Publish Demo App to MicroApps - Root App
392396
run: |
393397
npx microapps-publish publish \
394-
-a '[root]' \
395-
-t lambda-url \
398+
--app-name '[root]' \
399+
--type lambda-url \
396400
--startup-type direct \
397-
-n ${PACKAGE_VERSION} \
398-
-d ${DEPLOYER_LAMBDA_NAME} \
399-
-l ${DEMO_APP_LAMBDA_NAME} \
400-
-s packages/demo-app/static_files \
401-
-i index.html --overwrite --noCache
401+
--new-version ${PACKAGE_VERSION} \
402+
--deployer-lambda-name ${DEPLOYER_LAMBDA_NAME} \
403+
--app-lambda-name ${DEMO_APP_LAMBDA_NAME} \
404+
--static-assets-path packages/demo-app/static_files \
405+
--default-file index.html \
406+
--overwrite
402407
403408
- name: Demo App URL - Root App
404409
uses: Sibz/github-status-action@v1
@@ -424,13 +429,13 @@ jobs:
424429
- name: Publish Nextjs Demo App to MicroApps
425430
run: |
426431
npx microapps-publish publish \
427-
-t lambda-url \
432+
--app-name ${NEXTJS_DEMO_APP_NAME} \
433+
--type lambda-url \
428434
--startup-type direct \
429-
-a ${NEXTJS_DEMO_APP_NAME} \
430-
-n ${{ needs.build.outputs.nextjsDemoAppPackageVersion }} \
431-
-d ${DEPLOYER_LAMBDA_NAME} \
432-
-l ${NEXTJS_DEMO_APP_LAMBDA_VERSION_ARN} \
433-
-s node_modules/@pwrdrvr/microapps-app-nextjs-demo-cdk/lib/microapps-app-nextjs-demo/static_files/ \
435+
--new-version ${{ needs.build.outputs.nextjsDemoAppPackageVersion }} \
436+
--deployer-lambda-name ${DEPLOYER_LAMBDA_NAME} \
437+
--app-lambda-name ${NEXTJS_DEMO_APP_LAMBDA_VERSION_ARN} \
438+
--static-assets-path node_modules/@pwrdrvr/microapps-app-nextjs-demo-cdk/lib/microapps-app-nextjs-demo/static_files/ \
434439
--overwrite
435440
436441
- name: Nextjs Demo App URL
@@ -456,13 +461,13 @@ jobs:
456461
- name: Publish Release App to MicroApps
457462
run: |
458463
npx microapps-publish publish \
459-
-t lambda-url \
464+
--app-name ${RELEASE_APP_NAME} \
465+
--type lambda-url \
460466
--startup-type direct \
461-
-a ${RELEASE_APP_NAME} \
462-
-n ${{ needs.build.outputs.releaseAppPackageVersion }} \
463-
-d ${DEPLOYER_LAMBDA_NAME} \
464-
-l ${RELEASE_APP_LAMBDA_VERSION_ARN} \
465-
-s node_modules/@pwrdrvr/microapps-app-release-cdk/lib/microapps-app-release/static_files/ \
467+
--new-version ${{ needs.build.outputs.releaseAppPackageVersion }} \
468+
--deployer-lambda-name ${DEPLOYER_LAMBDA_NAME} \
469+
--app-lambda-name ${RELEASE_APP_LAMBDA_VERSION_ARN} \
470+
--static-assets-path node_modules/@pwrdrvr/microapps-app-release-cdk/lib/microapps-app-release/static_files/ \
466471
--overwrite
467472
468473
- name: Release App URL
@@ -549,14 +554,15 @@ jobs:
549554
if: ${{ matrix.deployName == 'microapps-core' }}
550555
run: |
551556
npx microapps-publish publish \
552-
-a ${DEMO_APP_NAME} \
553-
-t lambda-url \
557+
--app-name ${DEMO_APP_NAME} \
558+
--type lambda-url \
554559
--startup-type direct \
555-
-n 0.0.0-child.1 \
556-
-d ${CHILD_DEPLOYER_LAMBDA_ARN} \
557-
-l ${CHILD_DEMO_APP_LAMBDA_VERSION_ARN} \
558-
-s packages/demo-app/static_files \
559-
-i index.html --overwrite
560+
--new-version 0.0.0-child.1 \
561+
--deployer-lambda-name ${CHILD_DEPLOYER_LAMBDA_ARN} \
562+
--app-lambda-name ${CHILD_DEMO_APP_LAMBDA_VERSION_ARN} \
563+
--static-assets-path packages/demo-app/static_files \
564+
--default-file index.html \
565+
--overwrite
560566
561567
- name: Test Demo App - Child
562568
if: ${{ matrix.deployName == 'microapps-core' }}

.vscode/launch.json

Lines changed: 0 additions & 107 deletions
This file was deleted.

deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ RELEASE_APP_LAMBDA_NAME=$(aws cloudformation list-exports --query "Exports[?Name
2222
EDGE_DOMAIN=$(aws cloudformation list-exports --query "Exports[?Name==\`microapps-demo-deploy-${NODE_ENV}-edge-domain-name\`].Value" --no-paginate --output text)
2323

2424
# Deploy the Release App
25-
npx microapps-publish publish -a release -n ${RELEASE_APP_PACKAGE_VERSION} -d ${DEPLOYER_LAMBDA_NAME} -l ${RELEASE_APP_LAMBDA_NAME} -s node_modules/@pwrdrvr/microapps-app-release-cdk/lib/static_files/release/${RELEASE_APP_PACKAGE_VERSION}/ --overwrite --noCache
25+
npx microapps-publish publish --app-name release --new-version ${RELEASE_APP_PACKAGE_VERSION} --deployer-lambda-name ${DEPLOYER_LAMBDA_NAME} --app-lambda-name ${RELEASE_APP_LAMBDA_NAME} --static-assets-path node_modules/@pwrdrvr/microapps-app-release-cdk/lib/static_files/release/${RELEASE_APP_PACKAGE_VERSION}/ --overwrite --no-cache
2626

2727
# Print App URL
2828
echo "App Available at URL: https://${EDGE_DOMAIN}/release/"

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ module.exports = {
158158
// "**/__tests__/**/*.[jt]s?(x)",
159159
// "**/?(*.)+(spec|test).[tj]s?(x)"
160160
// ],
161-
testMatch: ['**/(*.)+(spec|test).ts'],
161+
testMatch: ['**/(*.)+spec.ts?(x)'],
162162

163163
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
164164
// testPathIgnorePatterns: [

packages/microapps-cdk/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Note: requests can also be dispatched into the same account, but this model is m
8686
- Deploys the CDK Stack
8787
- Essentially runs two commands along with extraction of outputs:
8888
- `npx cdk deploy --context @pwrdrvr/microapps:deployReleaseApp=true microapps-basic`
89-
- `npx microapps-publish publish -a release -n ${RELEASE_APP_PACKAGE_VERSION} -d ${DEPLOYER_LAMBDA_NAME} -l ${RELEASE_APP_LAMBDA_NAME} -s node_modules/@pwrdrvr/microapps-app-release-cdk/lib/static_files/release/${RELEASE_APP_PACKAGE_VERSION}/ --overwrite --noCache`
89+
- `npx microapps-publish publish --app-name release --new-version ${RELEASE_APP_PACKAGE_VERSION} --deployer-lambda-name ${DEPLOYER_LAMBDA_NAME} --app-lambda-name ${RELEASE_APP_LAMBDA_NAME} --static-assets-path node_modules/@pwrdrvr/microapps-app-release-cdk/lib/static_files/release/${RELEASE_APP_PACKAGE_VERSION}/ --overwrite --no-cache`
9090
- URL will be printed as last output
9191

9292
# Limitations / Future Development
File renamed without changes.
File renamed without changes.
File renamed without changes.

packages/microapps-cdk/test/MicroAppsEdgeToOrigin.test.ts renamed to packages/microapps-cdk/test/MicroAppsEdgeToOrigin.spec.ts

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)