Skip to content

Commit

Permalink
Merge remote-tracking branch 'shopify-app-template-remix/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeclifton committed Sep 17, 2024
2 parents 3eaad8e + 93b9952 commit 61323d2
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 30 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/ci.yml

This file was deleted.

8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ database.sqlite
.env
.env.*
.dev.vars

package-lock.json
yarn.lock

pnpm-lock.yaml
/extensions/*/dist

# Ignore shopify files created during app dev
.shopify/*
.shopify.lock

2 changes: 1 addition & 1 deletion .graphqlrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function getConfig() {
default: shopifyApiProject({
apiType: ApiType.Admin,
apiVersion: LATEST_API_VERSION,
documents: ["./app/**/*.{js,ts,jsx,tsx}"],
documents: ["./app/**/*.{js,ts,jsx,tsx}", "./app/.server/**/*.{js,ts,jsx,tsx}"],
outputDir: "./app/types",
}),
},
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# @shopify/shopify-app-template-remix

## 2024.08.19

Replaced deprecated `productVariantUpdate` with `productVariantsBulkUpdate`

## v2024.08.06

Allow `SHOP_REDACT` webhook to process without admin context

## v2024.07.16
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Shopify App Template - Remix (Cloudflare Pages)
# Shopify App Template - Remix - Cloudflare Pages Deployment Ready


This is a template for building a [Shopify app](https://shopify.dev/docs/apps/getting-started) using the [Remix](https://remix.run) framework.

Expand Down
15 changes: 15 additions & 0 deletions app/db.server.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { PrismaClient } from "@prisma/client";

declare global {
var prisma: PrismaClient;
}

const prisma: PrismaClient = global.prisma || new PrismaClient();

if (process.env.NODE_ENV !== "production") {
if (!global.prisma) {
global.prisma = new PrismaClient();
}
}

export default prisma;
2 changes: 1 addition & 1 deletion app/entry.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default async function handleRequest(
loadContext: AppLoadContext
) {
loadContext.shopify.addDocumentResponseHeaders(request, responseHeaders);

const body = await renderToReadableStream(
<RemixServer context={remixContext} url={request.url} />,
{
Expand Down
2 changes: 1 addition & 1 deletion app/shopify.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ export function createShopifyAppContext(env: Env) {
? { customShopDomains: [env.SHOP_CUSTOM_DOMAIN] }
: {}),
});
}
}
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@
"trustedDependencies": [
"@shopify/plugin-cloudflare"
],
"resolutions": {
"undici": "6.13.0"
},
"overrides": {
"undici": "6.13.0"
}
"resolutions": {},
"overrides": {}
}

0 comments on commit 61323d2

Please sign in to comment.