Skip to content

Commit 6b2346b

Browse files
Refactor marketplace SDK for edge cacheability (#286)
* Refactor marketplace SDK for edge cacheability * Fix arcade-ts format check failures * feat(client): enable edge runtime config
1 parent 4a976fd commit 6b2346b

26 files changed

+1636
-745
lines changed

.github/workflows/ci-typescript.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,8 @@ jobs:
8282
- name: Build TypeScript packages
8383
run: pnpm build
8484

85+
- name: Edge runtime smoke test (arcade-ts)
86+
run: pnpm --filter @cartridge/arcade test:edge:smoke
87+
8588
- name: Test TypeScript packages
8689
run: pnpm test:ts

client/src/context/provider.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export function Provider({ children }: PropsWithChildren) {
2727
config={{
2828
chainId: constants.StarknetChainId.SN_MAIN,
2929
defaultProject: DEFAULT_PROJECT,
30+
runtime: "edge",
3031
}}
3132
>
3233
<StarknetProvider>{children}</StarknetProvider>

packages/arcade-ts/package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@
2727
"import": "./dist/marketplace/index.mjs",
2828
"require": "./dist/marketplace/index.js"
2929
},
30+
"./marketplace/edge": {
31+
"types": "./dist/marketplace/edge.d.ts",
32+
"import": "./dist/marketplace/edge.mjs",
33+
"require": "./dist/marketplace/edge.js"
34+
},
3035
"./marketplace/react": {
3136
"types": "./dist/marketplace/react.d.ts",
3237
"import": "./dist/marketplace/react.mjs",
@@ -44,6 +49,7 @@
4449
"test:ts": "vitest run",
4550
"test:coverage": "vitest run --coverage",
4651
"test:watch": "vitest",
52+
"test:edge:smoke": "vitest run --config vitest.edge.config.ts",
4753
"test:integration": "RUN_INTEGRATION_TESTS=true vitest run --config vitest.integration.config.ts",
4854
"docs": "cd www && npm run start",
4955
"docs:build": "cd www && GIT_REVISION_OVERRIDE=${npm_config_git_revision_override} npm run build",

0 commit comments

Comments
 (0)