Skip to content

Commit

Permalink
Project update. [p][robotic]
Browse files Browse the repository at this point in the history
  • Loading branch information
jaswrks committed Jan 22, 2024
1 parent 621cc19 commit 0f42324
Show file tree
Hide file tree
Showing 13 changed files with 163 additions and 180 deletions.
2 changes: 1 addition & 1 deletion .browserslistrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Generated data.
# <generated:start>

# Last generated Jan 20, 2024 7:54 PM UTC.
# Last generated Jan 22, 2024 9:30 PM UTC.

[production]
node >= 20.9.0
Expand Down
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Generated data.
# <generated:start>

# Last generated Jan 20, 2024 7:54 PM UTC.
# Last generated Jan 22, 2024 9:30 PM UTC.

# Locals

Expand Down
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Generated data.
# <generated:start>

# Last generated Jan 20, 2024 7:54 PM UTC.
# Last generated Jan 22, 2024 9:30 PM UTC.

# Default

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Generated data.
# <generated:start>

# Last generated Jan 20, 2024 7:54 PM UTC.
# Last generated Jan 22, 2024 9:30 PM UTC.

# Locals

Expand Down
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# Generated data.
# <generated:start>

# Last generated Jan 20, 2024 7:54 PM UTC.
# Last generated Jan 22, 2024 9:30 PM UTC.

# Locals

Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Generated data.
# <generated:start>

# Last generated Jan 20, 2024 7:54 PM UTC.
# Last generated Jan 22, 2024 9:30 PM UTC.

# Packages

Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @note This entire file will be updated automatically.
* @note Instead of editing here, please review `./settings.mjs`.
*
* Last generated using `./settings.mjs` Jan 20, 2024 7:54 PM UTC.
* Last generated using `./settings.mjs` Jan 22, 2024 9:30 PM UTC.
*/
{
"editor.formatOnType": false,
Expand Down
2 changes: 1 addition & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Generated data.
# <generated:start>

# Last generated Jan 20, 2024 7:54 PM UTC.
# Last generated Jan 22, 2024 9:30 PM UTC.

# Locals

Expand Down
43 changes: 13 additions & 30 deletions dev/.files/wrangler/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import path from 'node:path';
import { $fs } from '../../../node_modules/@clevercanyon/utilities.node/dist/index.js';
import { $obp } from '../../../node_modules/@clevercanyon/utilities/dist/index.js';
import { $obp, $time } from '../../../node_modules/@clevercanyon/utilities/dist/index.js';
import extensions from '../bin/includes/extensions.mjs';
import u from '../bin/includes/utilities.mjs';
import wranglerSettings from './settings.mjs';
Expand Down Expand Up @@ -63,35 +63,29 @@ export default async () => {

...(['cma', 'spa', 'mpa'].includes(appType) && ['cfw', 'cfp'].includes(targetEnv)
? {
// Worker account ID.

account_id: settings.defaultAccountId,

// Enables logpush for worker trace events.

logpush: true, // Requires workers paid plan.

...(['spa', 'mpa'].includes(appType)
? // Cloudflare pages site.
{
// Nothing more for now.
// CF UI is source of truth.
}
: // Cloudflare worker.
: // Cloudflare worker configuration.
{
// We don’t use.
// Worker account ID.
account_id: settings.defaultAccountId,

workers_dev: false,
// Enables logpush for worker trace events.
logpush: true, // Requires workers paid plan.

// Worker name.
// Sets a default upper limit on CPU time.
limits: { cpu_ms: $time.secondInMilliseconds * 5 },

// Worker name.
name: settings.defaultWorkerName,

// App main entry configuration.

main: './' + path.relative(projDir, './dist/index.js'),

// Bundling configuration; {@see <https://o5p.me/JRHxfC>}.

rules: [
{
type: 'ESModule',
Expand Down Expand Up @@ -161,27 +155,15 @@ export default async () => {
},
{ type: 'CompiledWasm', globs: extensions.asNoBraceGlobstars([...extensions.byCanonical.wasm]), fallthrough: false },
],
// Custom build configuration.

// Custom build configuration.
build: {
cwd: './' + path.relative(projDir, './'),
watch_dir: './' + path.relative(projDir, './src'),
command: 'npx @clevercanyon/madrun build --mode=prod',
},
// Worker sites; i.e., bucket configuration.
// Disabled by default and not necessary any longer.
// Prefer using R2 for any static files used by workers.
// Or, build a Cloudflare Pages site instead of just a worker.
// site: {
// bucket: './' + path.relative(projDir, './dist/assets'),
// exclude: [
// ...$path.defaultNPMIgnores(),
// '/a16s', // A16s (top-level only).
// ],
// },

// Worker route configuration.

// Route configuration.
route: {
zone_name: settings.defaultWorkerZoneName,
pattern: settings.defaultWorkersDomain + '/' + settings.defaultWorkerShortName + '/*',
Expand All @@ -195,6 +177,7 @@ export default async () => {
},

// Environments used by this worker.
workers_dev: false, // We don’t use `*workers.dev`.
env: {
// `$ madrun wrangler dev` environment, for local testing.
dev: {
Expand Down
Loading

0 comments on commit 0f42324

Please sign in to comment.