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

SvelteKit support #11421

Closed
2 tasks
24jr opened this issue Nov 16, 2021 · 37 comments
Closed
2 tasks

SvelteKit support #11421

24jr opened this issue Nov 16, 2021 · 37 comments
Assignees
Labels
duplicate If marked with duplicate, issue will be closed & original will be added for traceability feature-request Request a new feature transferred This issue was transferred from another Amplify project

Comments

@24jr
Copy link

24jr commented Nov 16, 2021

Is this related to a new or existing framework?

New framework

Is this related to a new or existing API?

No response

Is this related to another service?

No response

Describe the feature you'd like to request

I along with many others are running into some issues trying to use sveltekit with aws amplify. I'm not sure if there is a formal feature request to get support for it or if it is being worked on to be supported by aws amplify.

Describe the solution you'd like

Ui components could be good eventually but even just getting it to work more easily or have simple guide would be great. I've managed to get around many of the gotchas but can't get it to build. Even if I somehow figure this part out it seams like there should be a more guided approach for using sveltekit with aws amplify

Describe alternatives you've considered

aws/aws-sdk-js#3673
#9639
aws-amplify/amplify-hosting#1298
aws-amplify/amplify-hosting#2318
#9056

Additional context

No response

Is this something that you'd be interested in working on?

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change
@ashika01
Copy link
Contributor

@24jr Could you detail us some of the workaround you did and why you have to do it? Right now, we are also waiting on aws/aws-sdk-js#3673. (Side note: Erik who opened up the issue is from our team). But if you have other things you think can be done in amplify that can unblock svelte usage, we would like to learn more of this.

@24jr
Copy link
Author

24jr commented Nov 16, 2021

Yeah that one was one I looked at and I don't want to repeat stuff of course but not sure if there was really a sveltekit focused issue to find solution but rather a mish mash of a bunch of things. So for me this is where I'm at. I'll just go over everything best I can remember

Standard skeleton svelte-kit project https://kit.svelte.dev/

npm init svelte@next my-app
cd my-app
npm install

I used aws amplify admin ui to create my backend so ran (of course this first npm install -g @aws-amplify/cli)

amplify pull --appId d2zuoroq5jzalo --envName staging

p.s. make sure your default browser set to chrome not brave or won't work when login prompt shows

? Choose your default editor: Visual Studio Code
? Choose the type of app that you're building javascript
Please tell us about your project
? What javascript framework are you using none
? Source Directory Path:  src
? Distribution Directory Path: dist
? Build Command:  npm run-script build
? Start Command: npm run-script start
? Do you plan on modifying this backend? No

Pretty much just kept the defaults for all. of course no sveltekit option for js framework so kept as javascript. However the last choice was important to say No for plan to modify. because if I say yes it fails with

? Do you plan on modifying this backend? Yes
✔ Successfully pulled backend environment staging from the cloud.
✖ There was an error initializing your environment.
Failed to pull the backend.
Must use import to load ES Module: /Users/24jr/Documents/projects/2021/svelte/agility-all/agility/src/aws-exports.js
/usr/local/lib/node_modules/@aws-amplify/cli/node_modules/amplify-frontend-javascript/lib/frontend-config-creator.js:1
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users/24jr/Documents/projects/2021/svelte/agility-all/agility/src/aws-exports.js

I don't need to update the backend directly in the app so this was not a big deal. Selecting No was fine and worked. When I wanted update the graphQL schema lets say I would go to an empty folder outside of sveltekit proj and do the same amplify pull --appId d2zuoroq5jzalo --envName staging and say yes in that and it would succeed and I could make changes to schema from there. I didnt do anything other than update schema like this.

To get amplify to work in the app I added to app.html

<script>
  const isBrowser = () => typeof window !== 'undefined';
  const isGlobal = () => typeof global !== 'undefined';
  var exports = {};
  if (!isGlobal() && isBrowser()) {
      var global = window;
  }
</script>

I put the Amplify imports in the __layout.svelte route because my understanding is it's a main part of every page and context="module" runs first

<script context="module">
  import "../app.css";
  import Layout from "$lib/views/Layout/index.svelte";
  // import Amplify from "aws-amplify";
  import { Amplify } from '@aws-amplify/core'
  import awsExports from "../aws-exports";
  Amplify.configure({ ...awsExports, ssr: true });
  import { initAuth } from "$lib/components/Auth/store";
  initAuth();
</script>

I believe was having some issue with import Amplify from "aws-amplify"; however import { Amplify } from '@aws-amplify/core' worked as alternative

From this point everything worked fine in the app with authentication and making mutations and queries to my backend as usually done with API.graphql(...

To build I used adapter-static from https:/sveltejs/kit/tree/master/packages/adapter-static

npm i -D @sveltejs/adapter-static@next

My resulting svelte.config.js file looked like

/** @type {import('@sveltejs/kit').Config} */
import adapter from '@sveltejs/adapter-static';

export default {
    kit: {
    target: '#svelte',
    adapter: adapter({
	pages: 'build',
	assets: 'build',
	fallback: null
    }),
    vite: {
      resolve: {
        alias: {
          './runtimeConfig': './runtimeConfig.browser',
        },
      },
    },
  }
};

alias: { './runtimeConfig': './runtimeConfig.browser', } part had to be done for it to successfully build with amplify

Now phew got through this stuff. npm run build creates build folder successfully npm run preview runs app successfully. Ok push to github and in admin ui add the front end to existing backend and fails. Then was looking into using the amplify.yml to make it potentially work and this is where landed though still didn't work

version: 1
env:
  variables:
    USER_BRANCH: staging
backend:
  phases:
    build:
      commands:
        - '# Execute Amplify CLI with the helper script'
        - amplifyPush --simple
frontend:
  phases:
    preBuild:
      commands:
        - npm install
    build:
      commands:
        - npm run build
  artifacts:
    baseDirectory: build
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*

Error in amplify build process is long but important part assuming is

2021-11-15T22:27:51.722Z [WARNING]: ✔ Successfully pulled backend environment staging from the cloud.
2021-11-15T22:27:51.745Z [WARNING]: ✖ There was an error initializing your environment.

Then I saw Rich Harris the main svelte guy was going to be working on svelte and be backed by vercel so I was like I have no idea what that is but if they like sveltekit then lets check it out. And they did hosting so tried that and successfully got sveltekit projects working however not with my amplify backend and wouldnt be able to find ../aws-exports.js which is because it was in gitignore which explicitly says dont edit this and I'm not super well versed on the exact procedures with that so that didn't work and josef in the discord group who seems pretty smart and helpful said I could look into doing a bash script but he hasnt tried that and not sure if it will work. I don't even know what a bash script is so kindof just stuck hoping some sveltekit community beauties somehow pull through and eventually a person smarter than me figures this out.

This is my kind of base project was trying to use
https:/24jr/agility

and this was only backend thing which made in amplify ui. Also had email cognito auth and optional mfa
Screen Shot 2021-11-16 at 5 49 37 PM

If need more detail lmk I'll try and help best I can. May have forgot something here or there. Also want to look at my auth component I spent a long time on that could help if making ui components for sveltekit at some point

these are what appear to be preliminary next docs and for vue mentions vite instructions https://ui.docs.amplify.aws/getting-started/installation?platform=vue#vite

@ashika01
Copy link
Contributor

@24jr Thanks for the very detailed summary. This is super useful. To support svelte, it would be cross team effort and some help from SDK side as well. We have this discussion in our UI framework - https:/aws-amplify/amplify-ui/discussions/469

I am going to move this issue to UI since they will be helping with the framework and if there are bits that needs to be implemented on JS and Console we will work with them to get this one.

@ashika01 ashika01 transferred this issue from aws-amplify/amplify-js Nov 17, 2021
@24jr
Copy link
Author

24jr commented Nov 17, 2021

@ashika01 Ok great oh yeah I think I came accross that at one point but looked outdated and also not sure if sveltekit requires different setup than general svelte but seems like sveltekit will be the predominant usage of svelte. I so much appreciate your help in helping progress this to next steps!

@hvergara hvergara added the feature-request Request a new feature label Nov 18, 2021
@ErikCH
Copy link

ErikCH commented Nov 18, 2021

Hi @24jr

I really enjoy SvelteKit, and though we have not officially supported it yet in our updated UI library, we are looking at possibly adding it for the future.

I'm glad you've been able to find a workaround for most of the issues, but you're stuck on this one now?

Ok push to github and in admin ui add the front end to existing backend and fails.

So it's not deploying?

@24jr
Copy link
Author

24jr commented Nov 18, 2021

@ErikCH long time fan. I always say that to you lol. Yeah the hosting build fails. And awesome to hear you guys looking to add svelteKit. I would love that.

Screen Shot 2021-11-18 at 2 50 55 PM

Screen Shot 2021-11-18 at 2 52 44 PM

There was an error initializing your environment.
And I believe is same issue noticed when amplify pull project in and choose to update backend locally which I found alternative in updating the schema but I'm guessing they relate

@ErikCH
Copy link

ErikCH commented Nov 22, 2021

@24jr Thanks!

Alright, lots of good information. I'll see if I can reproduce this, I'll add feedback to this issue as soon as I can.

@Milan-Shah Milan-Shah added the pending-triage Issue is pending triage label Nov 24, 2021
@josefaidt
Copy link
Contributor

Hey @24jr and @ErikCH saw the update to this issue and wanted to chime in. I believe what we are experiencing with the build error is due to this issue from the CLI aws-amplify/amplify-cli#5691. As a workaround I've leveraged yarn workspaces (with yarn 1.x) to move the SvelteKit app to its own workspace. This allows us to use "type": "module" in the app's package.json as we see with SvelteKit sites, and after making this adjustment we can update our buildspec accordingly to deploy a static SvelteKit site

reference:

For the aws-exports import issue, I would recommend changing the src directory of your Amplify project to point to a workspace that does not have "type": "module" in the package.json, however we can use an exports declaration in a workspace's package.json to allow us to import given the context. In this example we are saying if we "import" this package, import the aws-exports file. Since this file is already written using ESM it will allow us to import the exports file into an ESM project like SvelteKit

import awsConfig from '@my/aws-exports'

@24jr
Copy link
Author

24jr commented Dec 13, 2021

@ErikCH Were you by chance able to find a good way to do this?

@ErikCH
Copy link

ErikCH commented Dec 14, 2021

@24jr !

Did this comment help with the build errors?

What I'm looking into is adding Svelte to our Authenticator UI library. That way you can use Svelte and easily add in the latest and greatest Authenticator (and soon Chatbot and Storage components). That's on the horizon soon!

After that is in place, we'll take a look at other places in the Amplify ecosystem that Svelte support is needed.

Does that make sense?

@24jr
Copy link
Author

24jr commented Dec 15, 2021

@ErikCH I am going to try that tomorrow. Yeah makes sense to so have an auth component to be able to help test some stuff easier. I built my own https:/24jr/agility/tree/main/src/lib/components/Auth . I know for vercel there is adapter-vercel and adapter-netlify idk if we just need an adapter-amplify. It's the build process that I'm stuck at now. Idk what yarn workspaces is but I'll give that a shot as @josefaidt suggested.

But cool pumped to hear there is some progress being made with svelte-kit! I am thankful for you @ErikCH !

Oh I see I am looking into this workspace stuff now I used npm this whole time so will try and do with npm. Then I see all this new stuff turborepo and vercel this is all new to me but will try and get a workspace going or monorepo whatever it may be called. And tbh I never give too much thought into all this npm yarn npx nvm pnmp stuff always just use the old ball and chain npm

@24jr
Copy link
Author

24jr commented Dec 15, 2021

@josefaidt @ErikCH here is my attempt with workspaces. I think its correct but I'm still new to this https:/24jr/test1 but when try and host I got
Screen Shot 2021-12-15 at 6 33 34 PM
Screen Shot 2021-12-15 at 6 33 45 PM
!!!Monorepo spec provided without "applications" key

I dont think hitting reconnect did anything so I just deleted that repo and added again. This is what doing lmk if something stands out
Screen Shot 2021-12-15 at 6 38 48 PM
Screen Shot 2021-12-15 at 6 39 16 PM
Screen Shot 2021-12-15 at 6 39 55 PM

Which is what I did before and yields same error of course

Ok this might have to do with when I added yml it wasn't identified by amplify while in root project so I moved it to root. aws-amplify/amplify-hosting#1995 https://docs.aws.amazon.com/amplify/latest/userguide/monorepo-configuration.html possibly just need to add applications and appRoot although yours doesn't seem to have that but I'll attempt this in a bit

@josefaidt
Copy link
Contributor

Hey @24jr can you try unchecking the "connecting a monorepo?" field and removing the folder choice? In the buildspec file (amplify.yml) listed in the above repository we're leveraging the baseDirectory property to direct Amplify to look for build files in the monorepo's workspace directory instead. https:/josefaidt/amplify-discord-bots/blob/main/amplify.yml#L14

@josefaidt
Copy link
Contributor

@24jr I created a small repository to showcase the set up where we can follow the commits for steps, however you can amplify add hosting at the last step to avoid multiple builds. It is important to note how we configure our project as well, pointing the src directory to the packages/aws-exports workspace (this is to tell the CLI where to generate the aws-exports.js file) josefaidt/amplify-svelte-kit-workaround@630a3f3#diff-b52cd865940ad3e166cf4a0f7870d325da9ecb1264d52e1b1ffaf33da2754f86

repository: https:/josefaidt/amplify-svelte-kit-workaround/commits/main
live site: https://main.d1vfckhhiu71it.amplifyapp.com/

@24jr
Copy link
Author

24jr commented Dec 16, 2021

Screen Shot 2021-12-16 at 12 41 12 AM

@josefaidt this is what got after unchecking monorepo. And wow great that is very helpful going to try those steps now!

@24jr
Copy link
Author

24jr commented Dec 16, 2021

@josefaidt Ok I went through based on your guide except stuck with npm. And didnt select updated backend locally because usually failed but maybe doesnt with workspaces didnt try but rather went through amplify studio in same steps as before. I think adapter-auto is new that is default with the skeleton svelte proj which I notice puts the build file in the svelte-kit file while the adapter-static puts the build file in the app root.
Screen Shot 2021-12-16 at 3 09 16 AM

I still failed at getting build latest I have is this which I think is all the steps but maybe skipped some. https:/24jr/test2 is my latest. Here is latest build error and I will go to sleep now and try again tomorrow

Screen Shot 2021-12-16 at 3 47 34 AM

Screen Shot 2021-12-16 at 3 48 08 AM

Screen Shot 2021-12-16 at 3 48 31 AM

Screen Shot 2021-12-16 at 3 48 49 AM

@24jr
Copy link
Author

24jr commented Dec 16, 2021

Screen Shot 2021-12-16 at 12 59 34 PM

@josefaidt the greatest 4 green circles I've ever seen! All thanks to you. That nvm install 16 is apparently important in prebuild. Idk what that is. Then Idk difference between adapter-auto and adapter-static but they do put build files in diff folders. I used static like you and I think is right one anyway but maybe would work with auto as well.

I did mine all with npm workspaces. I still am going to need to figure out the ins and outs of some of this workspace stuff and get used to it but it seems like not too complicated and something I can get behind. Thanks again!

I also havent tried adding auth and graphQL stuff and what not just this base stuff but I think will work we will see

@josefaidt
Copy link
Contributor

Ahhhh I'm glad to hear you're up and running with Svelte-Kit @24jr 🙌 ! A few notes:

That's also awesome to hear you were able to adapt this setup to use npm workspaces!

@24jr
Copy link
Author

24jr commented Dec 16, 2021

@josefaidt you changed my future lol. Thanks again. I changed the name of what I had and maybe I'll try and leave up as basis for me and others to go off of. Of course things change over time but good until then https:/24jr/amplify-sveltekit-template I made some components and added auth to this as well @ErikCH

@24jr
Copy link
Author

24jr commented Dec 17, 2021

@josefaidt Do you know why this is giving me this error? Missing "./package.json" export in "aws-exports" package perhaps something with this vitejs/vite#1505 or vitejs/vite#3417 or https://nodejs.org/api/packages.html#packages_subpath_patterns

might boil back down to this "type": "module" stuff again. They don't want us to succeed. I'm sure there are reasons for why so hard to get sveltekit working but hopefully just some different way to write this that works

{
  "name": "aws-exports",
  "exports": {
    ".": {
      "import": "./aws-exports.js"
    }
  }
}

Screen Shot 2021-12-17 at 4 01 14 AM

Screen Shot 2021-12-17 at 4 03 32 AM

Screen Shot 2021-12-17 at 12 57 57 AM

In my process of dipping my toe in the waters of nuxt this seems to be relevent to this issue and in fact has a similar silution to what we have i think so prob check this out https://v3.nuxtjs.org/concepts/esm

@josefaidt
Copy link
Contributor

Hey @24jr my apologies, missed that part. We'll want to add the following:

{
  "name": "aws-exports",
  "exports": {
    ".": {
      "import": "./aws-exports.js"
-   }
+   },
+   "./package.json": "./package.json"
  }
}

@Robert-Nickel
Copy link

Robert-Nickel commented Dec 20, 2021

I have the exact same issue, and I am very glad you guys discussed this only a few days ago! I looked at both of your repos (first @24jr's, then @josefaidt's) and did my best to structure my existing code and do all the corresponding configuration. I now have this error in the build (cloning repository) step:

2021-12-20T09:53:41.570Z [INFO]: Successfully cleaned up Git credentials
2021-12-20T09:53:41.570Z [INFO]: # Checking for Git submodules at: /codebuild/output/src062215029/src/lightbulb-learning/.gitmodules
2021-12-20T09:53:41.593Z [INFO]: # Retrieving environment cache...
2021-12-20T09:53:41.623Z [INFO]: # Retrieved environment cache
2021-12-20T09:53:41.623Z [INFO]: ---- Setting Up SSM Secrets ----
2021-12-20T09:53:41.623Z [INFO]: SSM params {"Path":"/amplify/d2wcvgtmnc7koy/sveltekit-picocss/","WithDecryption":true}
2021-12-20T09:53:50.166Z [INFO]: # Patching NPM package '@aws-amplify/cli' from 4.29.4 to 7.6.4...
2021-12-20T09:54:23.948Z [INFO]: npm WARN deprecated @graphql-toolkit/[email protected]: GraphQL Toolkit is deprecated and merged into GraphQL Tools, so it will no longer get updates. Use GraphQL Tools instead to stay up-to-date! Check out https://www.graphql-tools.com/docs/migration-from-toolkit for migration and https://the-guild.dev/blog/graphql-tools-v6 for new changes.
2021-12-20T09:54:30.329Z [INFO]: npm WARN deprecated [email protected]: https:/lydell/resolve-url#deprecated
2021-12-20T09:54:30.335Z [INFO]: npm WARN
2021-12-20T09:54:30.335Z [INFO]: deprecated [email protected]: Please see https:/lydell/urix#deprecated
2021-12-20T09:54:31.532Z [INFO]: npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
2021-12-20T09:54:35.275Z [INFO]: npm WARN deprecated
2021-12-20T09:54:35.276Z [INFO]: @graphql-toolkit/[email protected]: GraphQL Toolkit is deprecated and merged into GraphQL Tools, so it will no longer get updates. Use GraphQL Tools instead to stay up-to-date! Check out https://www.graphql-tools.com/docs/migration-from-toolkit for migration and https://the-guild.dev/blog/graphql-tools-v6 for new changes.
2021-12-20T09:54:35.953Z [INFO]: npm WARN deprecated [email protected]: GraphQL Import has been deprecated and merged into GraphQL Tools, so it will no longer get updates. Use GraphQL Tools instead to stay up-to-date! Check out https://www.graphql-tools.com/docs/migration-from-import for migration and https://the-guild.dev/blog/graphql-tools-v6 for new changes.
2021-12-20T09:54:50.332Z [INFO]: npm WARN
2021-12-20T09:54:50.338Z [INFO]: deprecated [email protected]: Use promise-toolbox/fromEvent instead
2021-12-20T09:55:52.028Z [INFO]: npm
2021-12-20T09:55:52.038Z [INFO]: WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/@aws-amplify/cli/node_modules/chokidar/node_modules/fsevents):
                                 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2021-12-20T09:55:52.039Z [INFO]: npm WARN @aws-amplify/[email protected] requires a peer of react@^17.0.2 but none is installed. You must install peer dependencies yourself.
2021-12-20T09:55:52.043Z [INFO]: npm WARN @aws-amplify/[email protected] requires a peer of react-dom@^17.0.2 but none is installed. You must install peer dependencies yourself.
2021-12-20T09:55:52.044Z [INFO]: 
2021-12-20T09:55:52.126Z [INFO]: # Done patching NPM package '@aws-amplify/cli' to version 7.6.4
2021-12-20T09:55:52.138Z [WARNING]: !TypeError: Cannot read property 'trim' of undefined
2021-12-20T09:55:52.139Z [ERROR]: !!! TypeError: Cannot read property 'trim' of undefined
2021-12-20T09:55:52.139Z [INFO]: # Starting environment caching...
2021-12-20T09:55:52.140Z [INFO]: # Environment caching completed
Terminating logging...

This doesn't happen when building locally. You can see my whole code in my repo here. Do you have anything in mind that I should check to get this running?

@24jr
Copy link
Author

24jr commented Dec 22, 2021

@Robert-Nickel I may have had that problem and found that some of my imports had different capitalization than was accurate and locally was fine but failed like this in build. Like may have '$lib/Components/Button/index.svelte' instead import Button from '$lib/components/Button/index.svelte' but could be something different here

@ErikCH
Copy link

ErikCH commented Dec 28, 2021

Hey @24jr!

Wow, the repo is awesome! Thanks for putting that together. Also thanks for @josefaidt for all the help! I'll keep everyone updated with the progress on the amplify-ui library!

@ErikCH
Copy link

ErikCH commented Jan 7, 2022

Hey @24jr and @josefaidt !

I just published a Proof-Of-Concept (POC) version of the authenticator with Svelte, using SvelteKit. Right now it only works with SignIn, but soon it will have more functionality! Feel free to check out the repo as well with any thoughts or comments

To get it running follow these steps

$ npm init svelte@next your-demo
$ cd your-demo
$ yarn add aws-amplify @aws-amplify/ui-svelte@next

Update these files

App.html

...
<script>
  window.global = window;
  var exports = {};
</script>

svelte.config.js (working on reducing deps now)

import adapter from '@sveltejs/adapter-static';
import preprocess from 'svelte-preprocess';

/** @type {import('@sveltejs/kit').Config} */
const config = {
	// Consult https:/sveltejs/svelte-preprocess
	// for more information about preprocessors
	preprocess: preprocess(),

	kit: {
		adapter: adapter(),

		// hydrate the <div id="svelte"> element in src/app.html
		target: '#svelte',
		vite: {
			optimizeDeps: {
				include: [
					'lodash',
					'lodash/merge',
					'lodash/isEmpty',
					'lodash/includes',
					'lodash/kebabCase',
					'xstate/lib/actions',
					'lodash/pickBy',
					'lodash/get',
					'style-dictionary/lib/utils/deepExtend',
					'style-dictionary/lib/utils/flattenProperties',
					'style-dictionary/lib/utils/references/usesReference'
				]
			},
			plugins: [],
			ssr: {
				noExternal:
					process.env.NODE_ENV !== 'development' ? ['lodash', 'xstate', 'style-dictionary'] : []
			},
			resolve: {
				alias: {
					'./runtimeConfig': './runtimeConfig.browser'
				}
			}
		}
	}
};

export default config;

Then just add the Authenticator to your routes.

index.svelte

<script lang="ts">
	import { Amplify } from 'aws-amplify';
	import { Authenticator, authStore } from '@aws-amplify/ui-svelte';
	import '@aws-amplify/ui-svelte/styles.css';
	Amplify.configure({  });
	const { signOut, user } = authStore;
</script>

<Authenticator>
	<h1>Hello {$user.username}!</h1>
	<button on:click={signOut}>Sign Out</button>
</Authenticator>

Let me know!

@24jr
Copy link
Author

24jr commented Jan 7, 2022

@ErikCH @josefaidt Is there a diff between app.html

<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<meta name="description" content="" />
		<link rel="icon" href="/favicon.png" />
		<meta name="viewport" content="width=device-width, initial-scale=1" />
		%svelte.head%
    <script>
			// temporary workaround for Amplify JS
			window.global = window;
			var exports = {};
		</script>
	</head>
	</head>
	<body>
		<div id="svelte">%svelte.body%</div>
	</body>
</html>

and

<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<meta name="description" content="" />
		<link rel="icon" href="/favicon.png" />
		<meta name="viewport" content="width=device-width, initial-scale=1" />
		%svelte.head%
	</head>
	<body>
		<div id="svelte">%svelte.body%</div>
	</body>
</html>

<script>
	const isBrowser = () => typeof window !== 'undefined';
	const isGlobal = () => typeof global !== 'undefined';

	var exports = {};
	if (!isGlobal() && isBrowser()) {
		var global = window;
	}
</script>

I prev had longer one until noticed josef had shorter one and that seemed to work fine.

I just tested this and sign in worked for me. I did not use workspaces or build for hosting but maybe the new config file here is for solving stuff like that. I also tried half signing in on my other site and having it send email code but not verifying and on sign in got error that didnt show I believe

@ErikCH
Copy link

ErikCH commented Jan 7, 2022

Hey @24jr !

Yes you are right, the shorter app.html will work. I just copied and pasted yours, thinking you saw something I didn't! I'll update the post.

I have not tried hosting, but it should work the same. The new svelte config is mostly because we are using xstate, lodash and style-dictionary in our @aws-amplify/ui library. Xstate is our internal store, that we share between all the different implementations of the authenticator. style-dictionary is mostly for our theming, which one day we could see bringing to other frameworks, other then React. I'd like to remove lodash in the future. Or maybe switch to lodash-es which is more ESM friendly.

I don't have any verification built in yet, if that's the test you were running. My next step is to get sign-up working. Thanks for taking a look.

@24jr
Copy link
Author

24jr commented Jan 8, 2022

@ErikCH ok perfect yeah i didnt think through the logic of what any of that is doing just copied from solution to issue a while back and worked but i think I did switch to shorter one in the template I made because I always choose shorter lol but idk if. there was reason for other way. The reason I had to use workspaces was because that was the only way it worked for hosting before (solution found thanks to @josefaidt )

@dlamon1
Copy link

dlamon1 commented Jun 11, 2022

@ErikCH thank you for your work with this! Will the svelte-ui repo work with all of amplify, or just Auth?

@RedZepplin
Copy link

Hi all, amazing work you've done here, any feedback on this? I tried @ErikCH 's solution above but it seems both AWS amplify and Svelte have changed over the years and have broken this workaround. Any guidance would be appreciated. would really love to use AWS Amplify with Svelte on my current project

@brillout
Copy link

Possibly related: aws-amplify/amplify-ui#3155.

thaddmt referenced this issue in aws-amplify/amplify-ui Apr 10, 2023
* fix: Update error handling (#679)

* WIP

* chore: update error state handling to only user onError, added onFailure callback

* chore: move default error components to separate components (#680)

* chore: move default error components to separate components

* chore: update unit tests

* fix: remove unused variable

* refactor(liveness): move examples/liveness-next to examples/next (#681)

* refactor(liveness): add liveness example to next dir

* refactor(liveness): fix liveness example in next dir

* refactor(liveness): remove examples/liveness-next

* refactor(liveness): update README and env example

Co-authored-by: MJ☔ <[email protected]>

* fix: remove dotted line from liveness oval (#684)

* fix(liveness): update the links after refactor the path (#685)

Co-authored-by: MJ☔ <[email protected]>

* chore: clean up app fixes, remove example logo (#686)

* fix: set liveness width seed to 1.0 (#688)

* fix: added message about multiple faces before countdown (#689)

* fix: set default video bit rate to 1 Mbps (#690)

* fix: handle errors from liveness stream with default server error messaging (#692)

* fix: handle errors from liveness stream with default server error messaging

* fix: unit tests

* refactor(liveness): TS strict helper liveness (#693)

* refactor(liveness): TS Strict for helper liveness

* refactor(liveness): TS Strict for liveness helper

* refactor(liveness): TS Strict for liveness helper

* refactor(liveness): add isClientFreshnessColorSequence helper

* refactor(liveness): remove exclude from getColorsSequencesFromSessionInformation

Co-authored-by: MJ☔ <[email protected]>

* fix(liveness): getColorsSequencesFromSessionInformation type (#695)

Co-authored-by: MJ☔ <[email protected]>

* fix: re-order stop video events to fix empty chunk getting sent before all video events are done (#697)

* fix: add amplify user agent to rekognition streaming client (#698)

* fix: Remove unused deps (#696)

* fix: remove unused deps webrtc-adapater, aws-sdk-liveness, uuid

* fix: add back in xstate dep

* add  yarn.lock

* fix: unit tests

* fix: fix unit test

* fix: analytics events that were negative values (#699)

* fix: more copy updates (#701)

* fix: more copy updates

* fix: unit tests

* chore: update freeze stream to show paused video during uploading (#700)

* add pauseVideo action
* update freezeStream to not wait for animation end

* fix: small ux issues for fnf precheck (#704)

* fix: small ux issues for fnf precheck

* fix: unit test

* Revert "fix: set liveness width seed to 1.0 (#688)" (#708)

This reverts commit 6be24a9.

* test(liveness): set up tests for start screen (#687)

Co-authored-by: MJ☔ <[email protected]>

* fix: ensure that recording has started before continuing (#702)

* testing: added changes to increase video size (not resolution) by 10%, testing this change in beta this has not been reviewed

* fix: switch back to original timestamps (#710)

* fix: switch back to original timestamps

* remove unused method

* Revert "testing: added changes to increase video size (not resolution) by 10%, testing this change in beta this has not been reviewed" (#712)

This reverts commit 6d81f9f.

* chore: update copy from UXSO (#713)

* Update FPS message
* update max to maximum

---------

Co-authored-by: Heather Buchel <[email protected]>

* chore: added mobile landscape warning (#714)

* chore: added mobile landscape warning

* add safari friendly orientation detection (#716)

* add safari friendly orientation detection

* Add isMobile check back

* Add back 480 height to LivenessCheck

---------

Co-authored-by: Heather Buchel <[email protected]>

* fix lint

* fix unit tests

---------

Co-authored-by: Heather Buchel <[email protected]>
Co-authored-by: Heather Buchel <[email protected]>

* test(liveness): add more e2e tests (#711)

* test(liveness): add popover icon test

* test(liveness): add liveness detector tests

* test(liveness): add disable start screen tests

* test(liveness): add With Custom Components tests

* test(liveness): modify

---------

Co-authored-by: MJ☔ <[email protected]>

* chore: test new thresholds (#717)

* fix: update facebounding box generation and oval matching thresholds (#718)

* chore: add more unit test coverage for liveness (#694)

* chore: add more unit test coverage for liveness

* chore: update device maxtouchpoints to check full undefined

* chore: added logging for beta (#719)

* chore: more beta logs

* fix: testing an updated fix for oval matching

* chore: add even more logging for beta

* fix: try testing reducing min face match count to 3

* fix: add offset to timestamps based on how long it takes to do initial blazeface detection (#722)

* chore(ci): disable unneeded workflows (#724)

* chore:update test app to match example app

* fix: update min face match logic to be time based rather than count based

* fix: updated unit test, rename function

* fix: remove max resolution cap for mediaRecorder (#731)

* fix: remove max resolution cap for mediaRecorder

* fix: update unit tests

* fix: set recording timeslices to 200ms to fix low score issue (#733)

* fix: make mediaWidth/height logic more device agnostic (#727)

* fix: close icon misaligned (#734)

Co-authored-by: Heather Buchel <[email protected]>

* chore: add orientation utility tests (#735)

* fix: set recording start timestamp to be the min of calculated record… (#736)

* fix(liveness): stream-provider type (#737)

Co-authored-by: MJ☔ <[email protected]>

* chore: update face matching algorithm for liveness (#741)

* fix: remove all the logging statements we added for debugging (#732)

* chore: switch to using third party cdn for tfjs/blazeface (#742)

* fix: remove analytics calls baked into liveness component (#740)

* fix: remove analytics calls baked into liveness component

* remove analytics flag

* fix: fix linting

* chore: update client-rekognitionstreaming to SDK v3 (#739)

* chore: update magic numbers to use values from challenge config (#743)

* chore: update magic numbers to use values from challenge config

* chore: update to use calibrated pupil distance formula

* chore(liveness): move screen brightness instruction to the top

* chore: update copy per fnf ga and move more strings to use dictionary (#748)

* chore: update FaceLivenessDetector API based on meeting, removed onsu… (#746)

* chore: update FaceLivenessDetector API based on meeting, removed onsuccess/onfailure, combined onError and onPermissionDenied

* chore: fix unnecessary optional chaining

* chore: added options for overriding the tfjs and blazeface cdn urls (#750)

* chore: added options for overriding the tfjs and blazeface cdn urls

* Update packages/ui/src/helpers/liveness/blazeface-face-detection.ts

Co-authored-by: Heather Buchel <[email protected]>

* Update packages/ui/src/helpers/liveness/blazeface-face-detection.ts

Co-authored-by: Heather Buchel <[email protected]>

---------

Co-authored-by: Heather Buchel <[email protected]>

* chore: add VideoEndTimestamp to client info (#749)

* chore: add VideoEndTimestamp to client info
* chore: separate stopVideo and empty chunk dispatch events, update tests

* chore: setting up android, swift, and react liveness docs pages (#752)

* fix: remove extra data selectos from liveness (#753)

* fix: remove extra data selectos from liveness

* fix: rename prop data-testid to testId

* chore: use responsive sizing for video element and 4:3 resolution (#730)

* fix: add missing await when stopping liveenss video (#756)

* fix: use intrinsic videoWidth/videoHeight for video dims for correct face matching (#755)

* chore: set video width/height dims to intrinsic width to fix face matching from blazeface

* chore: remove useMediaDimensions

---------

Co-authored-by: Heather Buchel <[email protected]>

* chore: update api based on br review (#754)

* chore: update api based on br review

* chore: more api feedback fixes

* fix: small comment fix and build fix

* fix: update to onAnalysisComplete and config

* fix(liveness): flip drawn oval and update sessionInfo to use normalized face bounding box (#757)

* fix(liveness): flip oval matching logic as well (#758)

* chore(liveness): set up publishing new ui-react-liveness package (#759)

* chore(liveness): set up publishing new ui-react-liveness package

* update package.json and gitignore

* Update packages/react-liveness/package.json

Co-authored-by: Caleb Pollman <[email protected]>

* Update packages/react-liveness/package.json

Co-authored-by: Caleb Pollman <[email protected]>

* remove coma

---------

Co-authored-by: Caleb Pollman <[email protected]>

* chore(liveness): try increase video time chunks to 1000ms (#760)

* chore(liveness): try increase video time chunks to 1000ms

* chore(liveness): reorder events to prevent pauseafter countdown

* fix unit tests

* add android and swift info to docs

* chore: use full screen oval canvas on mobile, anchor video elements (#762)

* chore: use class name to apply mobile styles

* reposition oval drawing

* change translation method

* cleanup

* chore: anchor video ui elements to video frame

* class name cleanup

* remove unused values/cleanup

---------

Co-authored-by: Heather Buchel <[email protected]>

* chore: add debug logs and send them to sample app through hug events (#763)

* chore: add debug logs and send them to sample app through hug events

* remove core mocking

* chore(liveness): remove extraneous logging (#761)

* fix: remove webgl dep

* fix: fix breakpoint unit tests

* fix: use main yarn.lock and set eslint config back to error on nullish coalescing

* fix: fix import for react-countdown-circle-timer

* fix: skip unit test for now, fix later

* chore: update instruction texts from UX (#767)

* Revert "chore: add debug logs and send them to sample app through hug events (#763)"

This reverts commit 8e71060.

* chore(react-liveness): add non-code files, setup jest and ts

* chore(ui-react-liveness): migrate FaceLivenessDetector

* fix snapshot

* update FaceLivenessDetector imports

* add top level react-liveness command

* remove Liveness code from ui-react

* add top level react-liveness command

* chore: set opacity of camera view outside oval to 1.0 (#770)

* port update from aws-amplify/amplify-ui-staging#770

* fix snapshot

* fix: add missing react-liveness package to example app (#776)

* chore: clean up + update liveness CSS class names (#764)

* chore: flatten + cleanup classnames and styles

* chore: change initial face distance threshold to be 0.34 (#778)

* chore: change initial face distance threshold to be 0.34

* chore: move to constants folder and add comments explaining the numbers

* chore: updated comment for more clarity

* chore: try updating to .3

* add liveness quick start instructions and best practices

* chore(liveness): add region prop to component (#779)

* chore(liveness): add region prop to component

* chore: update comment to not list out regions and instead add a link in future

* chore(liveness): update threshold to 0.32 for testing

* chore(liveness): text updates

* chore: move instruction to top

* chore(liveness): added border colors, adjusted colors for usability study

* chore(liveness): add instrucitonal image

* Update packages/react-liveness/src/components/FaceLivenessDetector/shared/Toast.tsx

Co-authored-by: MJ Zhang <[email protected]>

* chore(liveness): update bullet index styling

* chore: try adding test for mouseless navigation (#774)

* chore: try adding test for keyboardless navigation

* chore: updated to get begin check workign with enter button

* chore(react-liveness): prepare for service code migration

* chore: update instructional text

* chore(ui-react-liveness): add styles exports

* update quick start instructions and add credentials provider info

* fix(ui-react-liveness): fix unit tests

* remove console.warn spy

* chore(ui-react-liveness): migrate service code

* add customization info

* Enable client debug logging (#789)

* chore: re-add client logging to aid with session debugging

* Fix copy/paste type in test to wrong videoRecorder path

---------

Co-authored-by: Heather Buchel <[email protected]>

* feat: Add Match Progress Indicator for usability testing (#800)

* fix: update 5s text to 8s (#801)

* fix: set initial faceMatchPercentage to 25 to match formula (#802)

Co-authored-by: Heather Buchel <[email protected]>

* chore: update api calls to match latest SDK changes (#803)

* chore: update api calls to match latest SDK changes

* chore: update to new version published in CA, rename OvalScaleFactors to OvalParameters

---------

Co-authored-by: Heather Buchel <[email protected]>

* fix initial face timestamp by ensuring recorder has started (#798)

* fix initial face timestamp by ensuring recoder has started

* Add new timestamp calculation from Science

* update comment

* Use Math.round() on calculated timestamp

---------

Co-authored-by: Heather Buchel <[email protected]>

* chore: Add illustration components for start screen, minor default components refactor (#804)

* Add illustration components for start screen

* Fix test. Add background behind figure image to match illustration

* Fix missing title tag

* remove some unneeded imports

* Add basic tests for new components

* fix darkmode by using Text component around text elements

---------

Co-authored-by: Heather Buchel <[email protected]>

* chore: adding retry logic for loading CDN files

* chore: update to use the retry logic from js core

* fix: adding args

* chore: update toasts during face matching to only show TOO_FAR, TOO_CLOSE toasts (#807)

* Show progress indicator only when state matches too far

* restrict when we show oval matching instructions to TOO_CLOSE, TOO_FAR, FACE_IDENTIFIED

* Update toasts for matching state

* update some comments, clean up code

* revert changes in LivenessCameraModule, addressed in separate PR

* add other face match state test scenarios during recording state

---------

Co-authored-by: Heather Buchel <[email protected]>

* fix: only show match indicator during TOO_FAR, FACE_IDENTIFIED states (#808)

Co-authored-by: Heather Buchel <[email protected]>

* update android docs

* chore: update face match timeout to 7 seconds (#811)

* chore: update face match timeout to 7 seconds

* update messaging to say 7 seconds instead of 8

---------

Co-authored-by: Heather Buchel <[email protected]>

* chore: update illustration tests (#805)

* chore: update tests for illustrations

* add testId props for test

* use nodeName and getByTitle

* use findBy instead of queryBy

---------

Co-authored-by: Heather Buchel <[email protected]>

* fix: move closer shouldn't show during MATCHED state (#810)

Co-authored-by: Heather Buchel <[email protected]>

* chore: update copy from UX/copywriter (#812)

* chore: copy updates

* chore: more copy updates

* fix oval instruction text

---------

Co-authored-by: Heather Buchel <[email protected]>

* update dark mode theme colors

* fix: error toast message should have  dark text in darkmode (#813)

Co-authored-by: Heather Buchel <[email protected]>

* fix: use a css custom property for the match indicator transition (#814)

Co-authored-by: Heather Buchel <[email protected]>

* fix: uncenter illustrations (#815)

Co-authored-by: Heather Buchel <[email protected]>

* I18n updates (#787)

* fix: overflow: hidden not working in safari on progress bar (#818)

Co-authored-by: Heather Buchel <[email protected]>

* Update test-internal-prs.yml (#819)

* chore(ui-react-liveness): add size-limit test

* remove extra file

* update light mode theme colors

* fix: 7 seconds string text (#823)

Co-authored-by: Heather Buchel <[email protected]>

* add link and update android versions

* chore: remove client side logging (#826)

Co-authored-by: Heather Buchel <[email protected]>

* fix: Show Match indicator during CANT_IDENTIFY state during recording (#825)

* fix: Show Match indicator during CANT_IDENTIFY state during recording

* consolidate state check into showMatchIndicatorStates

---------

Co-authored-by: Heather Buchel <[email protected]>

* add material3 dependency to setup

* remove placeholder for theming image

* test(liveness): add liveness build test (#824)

* test(liveness): add nextjs build test

* test(liveness): change build test nextjs size-limit

* test(liveness): change version to latest

* test(liveness): clean up code

* test(liveness): clean up code

* test(liveness): change version

---------

Co-authored-by: MJ☔ <[email protected]>

* add predictions dependency for liveness

* chore: move error modal to default overridable component (#827)

* chore: move error modal to default overridable component

* chore: move error modal

* chore: more fixes and string fixes

* Update packages/react-liveness/src/components/FaceLivenessDetector/LivenessCheck/LivenessCameraModule.tsx

Co-authored-by: Caleb Pollman <[email protected]>

---------

Co-authored-by: Caleb Pollman <[email protected]>

* remove instructions to add predictions plugin

* add rekognition liveness links

* remove unneeded dependencies

* fix: remove liveness error modal from export (#835)

* fix: remove liveness error modal from export

* chore: remove more export, update snapshot

* test(liveness): check CDN status (#830)

* test(liveness): check CDN status

* test(liveness): change CDN endpoint

* test(liveness): add jsdelivr CDN back

---------

Co-authored-by: MJ☔️ <[email protected]>

* chore(liveness): switch to public npm for client-rekognitionstreaming (#841)

* chore: add tests for when MatchIndicator should show in LivenessCameraModule (#839)

* chore: update tests for cases to show MatchIndicator

* remove unnecesary import

---------

Co-authored-by: Heather Buchel <[email protected]>

* chore: add tests for MatchIndicator (#833)

* chore: add tests for MatchIndicator

* ensure progress bar can't be less than 0 or more than 100, add tests

---------

Co-authored-by: Heather Buchel <[email protected]>

* chore: update yarn.lock

* chore: remove codeartifact and fix build issue

* chore: fix docs and tests

* chore: add social preview android/swift

* chore: added web liveness quick start to docs (#834)

* chore: added web liveness quick start to docs

* Update docs/src/pages/[platform]/connected-components/liveness/quick-start-example.react.mdx

Co-authored-by: Heather Buchel <[email protected]>

* chore: merged with android branch

* chore(liveness): add customization for react web

* chore: update text

* chore: added table of customizable components

* Update docs/src/pages/[platform]/connected-components/liveness/quick-start-pull.react.mdx

Co-authored-by: William Lee <[email protected]>

* Update docs/src/pages/[platform]/connected-components/liveness/customization/customization.i18n.react.mdx

Co-authored-by: William Lee <[email protected]>

* Update docs/src/pages/[platform]/connected-components/liveness/customization/customization.start-view.react.mdx

Co-authored-by: William Lee <[email protected]>

* Update docs/src/pages/[platform]/connected-components/liveness/customization/customization.theming.react.mdx

Co-authored-by: William Lee <[email protected]>

* Update docs/src/pages/[platform]/connected-components/liveness/customization/customization.theming.react.mdx

Co-authored-by: William Lee <[email protected]>

* Update docs/src/pages/[platform]/connected-components/liveness/quick-start-add.react.mdx

Co-authored-by: William Lee <[email protected]>

* Update docs/src/pages/[platform]/connected-components/liveness/quick-start-add.react.mdx

Co-authored-by: Scott Rees <[email protected]>

* chore: address comments

* Update docs/src/pages/[platform]/connected-components/liveness/quick-start-pull.react.mdx

* Update docs/src/pages/[platform]/connected-components/liveness/customization/customization.components.react.mdx

Co-authored-by: Scott Rees <[email protected]>

* chore: address comments

* Update docs/src/pages/[platform]/connected-components/liveness/quick-start-add.react.mdx

Co-authored-by: William Lee <[email protected]>

* Update docs/src/pages/[platform]/connected-components/liveness/customization/customization.components.react.mdx

Co-authored-by: William Lee <[email protected]>

* Update docs/src/pages/[platform]/connected-components/liveness/quick-start-add.react.mdx

Co-authored-by: William Lee <[email protected]>

* Update docs/src/pages/[platform]/connected-components/liveness/quick-start-add.react.mdx

Co-authored-by: William Lee <[email protected]>

* chore: address mor comments

* chore: updated customization table with links

* Update docs/src/pages/[platform]/connected-components/liveness/customization/customization.theming.react.mdx

Co-authored-by: Scott Rees <[email protected]>

* chore: more comment updates

---------

Co-authored-by: Heather Buchel <[email protected]>
Co-authored-by: William Lee <[email protected]>
Co-authored-by: Scott Rees <[email protected]>

* Liveness web docs examples (#847)

* chore(liveness): added liveness example to start page

* chore: added liveness docs examples

* chore: fixed sidebar errors

* Update docs/src/pages/[platform]/connected-components/liveness/customization/Customizationi18n.tsx

Co-authored-by: William Lee <[email protected]>

* Update docs/src/pages/[platform]/connected-components/liveness/customization/customization.components.react.mdx

Co-authored-by: William Lee <[email protected]>

* Update docs/src/pages/[platform]/connected-components/liveness/customization/customization.theming.react.mdx

Co-authored-by: William Lee <[email protected]>

* Update docs/src/pages/[platform]/connected-components/liveness/QuickStartReact.tsx

Co-authored-by: William Lee <[email protected]>

* chore: updated comments

* address feedback

---------

Co-authored-by: William Lee <[email protected]>

* chore: revert gh actions to match ui/main (#851)

* chore(liveness): add iOS docs content (#837)

* chore: update liveness streaming client (#855)

* chore: update liveness streaming client

* chore: remove CA install step

* chore: remove extraneous github workflows from staging

* chore: remove codeartifact gh action

* chore: remove examples react-native changes

* fix: clean up rn files and fix docs package.json

* chore: add liveness to pr unit tests

* fix(docs): hide install script for swift, fix install scripts format

* fix(liveness): fix unit tests build for react-liveness

* chore: add liveness e2e setup

* chore: setup liveness e2e tests to run

* chore: regenerate yarn.lock from main

* Update packages/react-core/src/Authenticator/hooks/useAuthenticator/constants.ts

Co-authored-by: Caleb Pollman <[email protected]>

* Update packages/react-core/src/Authenticator/hooks/useAuthenticator/constants.ts

Co-authored-by: Caleb Pollman <[email protected]>

* chore: remove auth mock file

* Create .changeset/brown-moles-grow.md

* Update .changeset/brown-moles-grow.md

Co-authored-by: Caleb Pollman <[email protected]>

* fix: workflow runs

* chore: try fix e2e again

* fix: docs snapshot

* Update .github/workflows/reusable-e2e.yml

Co-authored-by: William Lee <[email protected]>

* Update .github/workflows/reusable-e2e.yml

Co-authored-by: William Lee <[email protected]>

* chore: remove liveness env readme

* chore: fix folder structure for liveness environment (#3679)

* Move liveness backend to a nested folder

* Remove unrelated file

* Use us-east-1

* Update environments/liveness/package.json

* chore(docs): switch all instaces of all to be angular|flutter|react|react-native|vue since we added android and swift

* fix: remove unused livenessCard

* fix: update docs snapshot test

* fix: fix path for liveness env in next app

* fix: also fix export in other places

* fix: broken liveness e2e tests

* fix: fix liveness e2e env

* chore(docs): remove more default pages for android and swift

* chore: switch liveness next app to use prod endpoint

* chore: switch endpoint

* chore: fix region for liveness creds

* chore: fix more pr feedback

* chore: pin version

* update swift customization docs

* Temporarily skip link checker

* Revert "test(liveness): add liveness build test (#824)"

This reverts commit 2e0a816.

* chore: skip liveness canary

* chore: fix ios docs build error

---------

Co-authored-by: MJ Zhang <[email protected]>
Co-authored-by: MJ☔ <[email protected]>
Co-authored-by: Heather Buchel <[email protected]>
Co-authored-by: Heather Buchel <[email protected]>
Co-authored-by: William Lee <[email protected]>
Co-authored-by: Ioana Brooks <[email protected]>
Co-authored-by: Caleb Pollman <[email protected]>
Co-authored-by: Erica Eaton <[email protected]>
Co-authored-by: Chenwei Zhang <[email protected]>
Co-authored-by: Ayush Goyal <[email protected]>
Co-authored-by: Chenwei Zhang <[email protected]>
Co-authored-by: wlee221 <[email protected]>
Co-authored-by: Erica Eaton <[email protected]>
Co-authored-by: MJ☔️ <[email protected]>
Co-authored-by: Scott Rees <[email protected]>
Co-authored-by: Ian Saultz <[email protected]>
@reesscot reesscot added the transferred This issue was transferred from another Amplify project label May 26, 2023
@reesscot reesscot transferred this issue from aws-amplify/amplify-ui May 26, 2023
@reesscot
Copy link
Member

reesscot commented May 26, 2023

Transferred back to JS repo, as this is primarily related to SvelteKit support in main Amplify JS library.

This experimental @aws-amplify/ui-svelte package mentioned above is experimental and not supported

@nadetastic
Copy link
Member

Related to #12578

@nadetastic
Copy link
Member

With Amplify JS v6 we provide an adapter for only Next.js, although the underlying generic adapters may be used with other frameworks. You can find documentation on how to use the generic adapters here - docs.amplify.aws/react/build-a-backend/server-side-rendering

@stocaaro stocaaro removed their assignment Jan 11, 2024
@nadetastic
Copy link
Member

Closing this issue as we have not heard back from you. If you are still experiencing this, please feel free to reply and subscribe on this issue.

Thank you!

@nadetastic nadetastic added the duplicate If marked with duplicate, issue will be closed & original will be added for traceability label Feb 13, 2024
@benmccann
Copy link

Leaving a link here for anyone who comes across this issue, so that they're aware there's now a SvelteKit Amplify adapter: https:/gzimbron/amplify-adapter. The full list of adapters is available on https://www.sveltesociety.dev/packages?category=sveltekit-adapters - a few platforms have multiple adapters available

If anyone from AWS is interested in adding official first-party support for SvelteKit, please ping me and I'd be happy to add you to SvelteKit's partners program so that you can get direct support from the maintainers in supporting your integration

@dlamon1
Copy link

dlamon1 commented Jun 11, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate If marked with duplicate, issue will be closed & original will be added for traceability feature-request Request a new feature transferred This issue was transferred from another Amplify project
Projects
None yet
Development

No branches or pull requests