-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: bring in line with latest arc template
- Loading branch information
1 parent
af4c898
commit babe8bb
Showing
15 changed files
with
93 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
NODE_ENV="development" | ||
SESSION_SECRET="super-duper-s3cret" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// This should eventually be a npm package, but for now it lives here. | ||
// Its job is to notify the remix dev server of the version of the running | ||
// app to trigger HMR / HDR. | ||
|
||
import * as fs from "node:fs"; | ||
import * as path from "node:path"; | ||
|
||
import { logDevReady } from "@remix-run/node"; | ||
|
||
const buildPath = "server/index.mjs"; | ||
|
||
let lastTimeout; | ||
|
||
export default { | ||
sandbox: { | ||
async watcher() { | ||
if (lastTimeout) { | ||
clearTimeout(lastTimeout); | ||
} | ||
|
||
lastTimeout = setTimeout(async () => { | ||
const contents = fs.readFileSync( | ||
path.resolve(process.cwd(), buildPath), | ||
"utf8" | ||
); | ||
const manifestMatches = contents.matchAll(/manifest-([A-f0-9]+)\.js/g); | ||
const sent = new Set(); | ||
for (const match of manifestMatches) { | ||
const buildHash = match[1]; | ||
if (!sent.has(buildHash)) { | ||
sent.add(buildHash); | ||
logDevReady({ assets: { version: buildHash } }); | ||
} | ||
} | ||
}, 300); | ||
}, | ||
}, | ||
set: { | ||
env() { | ||
// Pass matching env variables through to the application in dev mode. | ||
const passthruKeys = /^NODE_ENV$|^REMIX_DEV_/; | ||
return { | ||
testing: Object.fromEntries( | ||
Object.entries(process.env).filter(([key]) => passthruKeys.test(key)) | ||
), | ||
}; | ||
}, | ||
}, | ||
}; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters