velocious 1.0.575 → 1.0.577
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -1
- package/build/background-jobs/main.js +13 -2
- package/build/background-jobs/scheduler.js +11 -7
- package/build/background-jobs/store.js +18 -13
- package/build/environment-handlers/node/cli/commands/test.js +2 -0
- package/build/environment-handlers/node/source-peer-package.js +172 -0
- package/build/routes/resolver.js +3 -50
- package/build/src/background-jobs/main.d.ts.map +1 -1
- package/build/src/background-jobs/main.js +13 -3
- package/build/src/background-jobs/scheduler.d.ts +2 -2
- package/build/src/background-jobs/scheduler.d.ts.map +1 -1
- package/build/src/background-jobs/scheduler.js +11 -8
- package/build/src/background-jobs/store.d.ts +5 -4
- package/build/src/background-jobs/store.d.ts.map +1 -1
- package/build/src/background-jobs/store.js +17 -12
- package/build/src/environment-handlers/node/cli/commands/test.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/test.js +3 -1
- package/build/src/environment-handlers/node/source-peer-package.d.ts +46 -0
- package/build/src/environment-handlers/node/source-peer-package.d.ts.map +1 -0
- package/build/src/environment-handlers/node/source-peer-package.js +148 -0
- package/build/src/routes/resolver.d.ts.map +1 -1
- package/build/src/routes/resolver.js +4 -45
- package/build/src/sync/sync-envelope-replay-service.d.ts.map +1 -1
- package/build/src/sync/sync-envelope-replay-service.js +9 -2
- package/build/sync/sync-envelope-replay-service.js +10 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -1
- package/scripts/run-tests.js +61 -20
- package/scripts/test-browser.js +6 -1
- package/src/background-jobs/main.js +13 -2
- package/src/background-jobs/scheduler.js +11 -7
- package/src/background-jobs/store.js +18 -13
- package/src/environment-handlers/node/cli/commands/test.js +2 -0
- package/src/environment-handlers/node/source-peer-package.js +172 -0
- package/src/routes/resolver.js +3 -50
- package/src/sync/sync-envelope-replay-service.js +10 -1
- package/build/deployment-api/controller.js +0 -437
- package/build/deployment-api/index.js +0 -210
- package/build/deployment-api/path-matcher.js +0 -45
- package/build/deployment-api/registry.js +0 -84
- package/build/deployment-api/run-store.js +0 -798
- package/build/deployment-api/sanitize.js +0 -114
- package/build/src/deployment-api/controller.d.ts +0 -117
- package/build/src/deployment-api/controller.d.ts.map +0 -1
- package/build/src/deployment-api/controller.js +0 -384
- package/build/src/deployment-api/index.d.ts +0 -46
- package/build/src/deployment-api/index.d.ts.map +0 -1
- package/build/src/deployment-api/index.js +0 -178
- package/build/src/deployment-api/path-matcher.d.ts +0 -31
- package/build/src/deployment-api/path-matcher.d.ts.map +0 -1
- package/build/src/deployment-api/path-matcher.js +0 -39
- package/build/src/deployment-api/registry.d.ts +0 -106
- package/build/src/deployment-api/registry.d.ts.map +0 -1
- package/build/src/deployment-api/registry.js +0 -74
- package/build/src/deployment-api/run-store.d.ts +0 -402
- package/build/src/deployment-api/run-store.d.ts.map +0 -1
- package/build/src/deployment-api/run-store.js +0 -711
- package/build/src/deployment-api/sanitize.d.ts +0 -27
- package/build/src/deployment-api/sanitize.d.ts.map +0 -1
- package/build/src/deployment-api/sanitize.js +0 -100
- package/src/deployment-api/controller.js +0 -437
- package/src/deployment-api/index.js +0 -210
- package/src/deployment-api/path-matcher.js +0 -45
- package/src/deployment-api/registry.js +0 -84
- package/src/deployment-api/run-store.js +0 -798
- package/src/deployment-api/sanitize.js +0 -114
package/README.md
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* Declarative state machines for models, with typed event methods generated into the base model (see [docs/state-machine.md](docs/state-machine.md))
|
|
10
10
|
* Migrations for schema changes and UTC datetime storage (see [docs/database-migrations.md](docs/database-migrations.md))
|
|
11
11
|
* External packages (engines) that contribute data models, frontend-model resources and migrations to a consuming app (see [docs/packages.md](docs/packages.md))
|
|
12
|
+
* Optional Rampway-owned durable deployment control plane mounted through the standard routes DSL on Velocious 1.0.577 or newer (see [docs/rampway-integration.md](docs/rampway-integration.md))
|
|
12
13
|
* Controllers and views for HTTP endpoints
|
|
13
14
|
* Frontend-model transport for creating, updating, querying, and subscribing to query-filtered lifecycle events over HTTP/WebSocket, with structured per-attribute validation error responses and one-budget WebSocket startup controls (see [docs/frontend-models.md](docs/frontend-models.md) and [docs/websocket-channels.md](docs/websocket-channels.md))
|
|
14
15
|
* Client-side offline sync mutation logs and frontend-model optimistic queueing primitives (see the [shared-resource sync developer guide](docs/shared-resource-sync-guide.md) and [offline sync architecture](docs/offline-sync.md))
|
|
@@ -30,7 +31,6 @@
|
|
|
30
31
|
* Default-on buffered HTTP response compression with Brotli/gzip content negotiation, global and per-response opt-outs, and HEAD-correct representation headers (see [docs/http-server.md](docs/http-server.md#response-compression))
|
|
31
32
|
* Background jobs with failure events for production reporting and authorized database-scoped dashboard count snapshots/deltas (see [docs/background-jobs.md](docs/background-jobs.md) and [docs/background-jobs-dashboard.md](docs/background-jobs-dashboard.md))
|
|
32
33
|
* Durable one-off background-job scheduling with exact epoch timestamps (see [docs/scheduled-background-job-enqueue.md](docs/scheduled-background-job-enqueue.md))
|
|
33
|
-
* Mountable authenticated callable deployment API with allowlisted projects/stages, immutable-revision validation, idempotent runs, duplicate-safe interruption reconciliation, and adapter-owned execution for integrations like Rampway (see [docs/deployment-api.md](docs/deployment-api.md))
|
|
34
34
|
* Rails-style request and database query logging (see [docs/logging.md](docs/logging.md))
|
|
35
35
|
* EJS-backed mailers with delivery, queueing, and payload rendering support (see [docs/mailers.md](docs/mailers.md))
|
|
36
36
|
* Trusted reverse proxy handling for `request.remoteAddress()` (see [docs/trusted-proxies.md](docs/trusted-proxies.md))
|
|
@@ -869,6 +869,51 @@ Supported route helpers:
|
|
|
869
869
|
- `routes.get(path, {to: [ControllerClass, "action"], params?})`
|
|
870
870
|
- `routes.post(path, {to: [ControllerClass, "action"], params?})`
|
|
871
871
|
|
|
872
|
+
## Rampway deployment control plane
|
|
873
|
+
|
|
874
|
+
Applications can install `rampway@^0.4.0` and mount its package-owned Velocious
|
|
875
|
+
control plane through the existing routes DSL. Keep bearer tokens in backend
|
|
876
|
+
secrets and provide explicit allowlisted config paths and release branches:
|
|
877
|
+
|
|
878
|
+
```sh
|
|
879
|
+
npm install rampway@^0.4.0 velocious@^1.0.577
|
|
880
|
+
```
|
|
881
|
+
|
|
882
|
+
Rampway 0.4.0 declares `velocious ^1.0.574` as its peer range, but applications
|
|
883
|
+
mounting this API must use Velocious 1.0.577 or newer. Versions 1.0.574 through
|
|
884
|
+
1.0.576 attempted an app-local controller import before the package-supplied
|
|
885
|
+
`controllerClass`, allowing a same-named app controller to shadow Rampway's
|
|
886
|
+
authenticated controller.
|
|
887
|
+
|
|
888
|
+
```js
|
|
889
|
+
import RampwayDeploymentApi from "rampway/velocious"
|
|
890
|
+
import deploymentSecrets from "./secrets/deployments.js"
|
|
891
|
+
|
|
892
|
+
routes.draw((route) => {
|
|
893
|
+
route.mount(RampwayDeploymentApi, {
|
|
894
|
+
accessTokens: deploymentSecrets.rampwayAccessTokens,
|
|
895
|
+
at: "/rampway/deployments",
|
|
896
|
+
projects: {
|
|
897
|
+
"my-app": {
|
|
898
|
+
stages: {
|
|
899
|
+
production: {
|
|
900
|
+
configPath: "/srv/my-app/control/rampway.config.mjs",
|
|
901
|
+
releaseBranch: "main"
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
},
|
|
906
|
+
workerBootstrapPath: "/srv/my-app/control/rampway-velocious-worker.mjs"
|
|
907
|
+
})
|
|
908
|
+
})
|
|
909
|
+
```
|
|
910
|
+
|
|
911
|
+
Rampway owns authentication, deployment execution, idempotency, durable runs,
|
|
912
|
+
audits, reconciliation, and the detached worker. Velocious supplies its normal
|
|
913
|
+
route, request, error-event, and database abstractions. See
|
|
914
|
+
[docs/rampway-integration.md](docs/rampway-integration.md) for bootstrap,
|
|
915
|
+
persistence, security, and rollback requirements.
|
|
916
|
+
|
|
872
917
|
|
|
873
918
|
```js
|
|
874
919
|
import Record from "velocious/build/src/database/record/index.js"
|
|
@@ -1354,9 +1354,20 @@ export default class BackgroundJobsMain {
|
|
|
1354
1354
|
if (this.dispatchStrategy === "polling") return
|
|
1355
1355
|
|
|
1356
1356
|
const next = await this.store.nextScheduledJob()
|
|
1357
|
-
|
|
1357
|
+
let delay
|
|
1358
1358
|
|
|
1359
|
-
|
|
1359
|
+
if (next && typeof next.scheduledAtMs === "number") {
|
|
1360
|
+
delay = Math.max(0, Math.min(next.scheduledAtMs - Date.now(), MAX_TIMER_MS))
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
// `nextScheduledJob` only returns future jobs, so a job that became
|
|
1364
|
+
// eligible after the drain's eligible-job probe is invisible to it. If one
|
|
1365
|
+
// is dispatchable now, arm a 0-delay re-drain so it is dispatched
|
|
1366
|
+
// immediately instead of being stranded until the next future timer (or
|
|
1367
|
+
// external signal) fires.
|
|
1368
|
+
if (await this.nextAvailableJobForReadyWorkers()) delay = 0
|
|
1369
|
+
|
|
1370
|
+
if (typeof delay !== "number") return
|
|
1360
1371
|
|
|
1361
1372
|
this._scheduledTimer = setTimeout(() => {
|
|
1362
1373
|
this._scheduledTimer = undefined
|
|
@@ -81,8 +81,8 @@ export default class BackgroundJobsScheduler {
|
|
|
81
81
|
* Narrows the runtime value to the documented type.
|
|
82
82
|
* @type {Array<ReturnType<typeof setTimeout>>} */
|
|
83
83
|
this.timeoutIds = []
|
|
84
|
-
/** @type {
|
|
85
|
-
this.
|
|
84
|
+
/** @type {Map<string, Promise<void>>} - In-flight scheduled enqueues by schedule key that shutdown must drain. */
|
|
85
|
+
this.pendingEnqueuesByJobKey = new Map()
|
|
86
86
|
/**
|
|
87
87
|
* Narrows the runtime value to the documented type.
|
|
88
88
|
* @type {boolean} - True between stop() and the next start(); cron self-rescheduler checks this so a stop() during an in-flight enqueue doesn't immediately re-arm.
|
|
@@ -131,7 +131,7 @@ export default class BackgroundJobsScheduler {
|
|
|
131
131
|
this.intervalIds = []
|
|
132
132
|
this.timeoutIds = []
|
|
133
133
|
|
|
134
|
-
await Promise.all(this.
|
|
134
|
+
await Promise.all(this.pendingEnqueuesByJobKey.values())
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
/**
|
|
@@ -181,13 +181,15 @@ export default class BackgroundJobsScheduler {
|
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
const timeoutId = setTimeout(() => {
|
|
184
|
-
|
|
184
|
+
const scheduledEnqueue = this.runScheduledJob({jobConfiguration, jobKey})
|
|
185
185
|
|
|
186
186
|
const intervalId = setInterval(() => {
|
|
187
|
-
|
|
187
|
+
return this.runScheduledJob({jobConfiguration, jobKey})
|
|
188
188
|
}, intervalMs)
|
|
189
189
|
|
|
190
190
|
this.intervalIds.push(intervalId)
|
|
191
|
+
|
|
192
|
+
return scheduledEnqueue
|
|
191
193
|
}, firstInMs)
|
|
192
194
|
|
|
193
195
|
this.timeoutIds.push(timeoutId)
|
|
@@ -242,13 +244,15 @@ export default class BackgroundJobsScheduler {
|
|
|
242
244
|
* @returns {Promise<void>} - Resolves after the enqueue attempt finishes.
|
|
243
245
|
*/
|
|
244
246
|
async runScheduledJob({jobConfiguration, jobKey}) {
|
|
247
|
+
if (this.stopped || this.pendingEnqueuesByJobKey.has(jobKey)) return
|
|
248
|
+
|
|
245
249
|
const pendingEnqueue = this.enqueueScheduledJob({jobConfiguration, jobKey})
|
|
246
|
-
this.
|
|
250
|
+
this.pendingEnqueuesByJobKey.set(jobKey, pendingEnqueue)
|
|
247
251
|
|
|
248
252
|
try {
|
|
249
253
|
await pendingEnqueue
|
|
250
254
|
} finally {
|
|
251
|
-
this.
|
|
255
|
+
this.pendingEnqueuesByJobKey.delete(jobKey)
|
|
252
256
|
}
|
|
253
257
|
}
|
|
254
258
|
|
|
@@ -77,7 +77,8 @@ const SORTABLE_COLUMNS = {
|
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
79
|
* Serializes concurrent `_applySchema` runs within THIS process, keyed by database
|
|
80
|
-
* identifier
|
|
80
|
+
* identifier, before callers without an existing connection check one out. Two
|
|
81
|
+
* stores that share one connection (SingleMultiUse / SQLite)
|
|
81
82
|
* otherwise interleave the multi-step table rebuild and corrupt it (the jobs table
|
|
82
83
|
* is left as its `*_velocious_rebuild` temp). A DB advisory lock can't fix that: on
|
|
83
84
|
* a session-scoped / re-entrant driver (MySQL `GET_LOCK`) a second acquire on the
|
|
@@ -1059,22 +1060,17 @@ export default class BackgroundJobsStore {
|
|
|
1059
1060
|
* @returns {Promise<void>} - Resolves when the schema is present.
|
|
1060
1061
|
*/
|
|
1061
1062
|
async _ensureSchema(existingDb) {
|
|
1062
|
-
|
|
1063
|
-
await this._applySchema(existingDb)
|
|
1064
|
-
|
|
1065
|
-
return
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
|
-
await this._withDb((db) => this._applySchema(db))
|
|
1063
|
+
await this._applySchema(existingDb)
|
|
1069
1064
|
}
|
|
1070
1065
|
|
|
1071
1066
|
/**
|
|
1072
|
-
*
|
|
1073
|
-
*
|
|
1074
|
-
* @param {import("../database/drivers/base.js").default}
|
|
1067
|
+
* Serializes creation or upgrade of the background-jobs schema, checking out a
|
|
1068
|
+
* connection only after earlier schema work has completed when one is not supplied.
|
|
1069
|
+
* @param {import("../database/drivers/base.js").default} [existingDb] - Caller-owned
|
|
1070
|
+
* database connection.
|
|
1075
1071
|
* @returns {Promise<void>} - Resolves when the schema is present.
|
|
1076
1072
|
*/
|
|
1077
|
-
async _applySchema(
|
|
1073
|
+
async _applySchema(existingDb) {
|
|
1078
1074
|
// Serialize concurrent schema applies within this process, keyed by database
|
|
1079
1075
|
// identifier (see `schemaApplyChains`). The per-step locks inside the steps use
|
|
1080
1076
|
// DIFFERENT lock names, so two concurrent callers could otherwise each hold a
|
|
@@ -1084,7 +1080,16 @@ export default class BackgroundJobsStore {
|
|
|
1084
1080
|
// the second caller then re-checks and finds every step already done.
|
|
1085
1081
|
const identifier = this.getDatabaseIdentifier() ?? "default"
|
|
1086
1082
|
const previous = schemaApplyChains.get(identifier) ?? Promise.resolve()
|
|
1087
|
-
const
|
|
1083
|
+
const applyWithConnection = async () => {
|
|
1084
|
+
if (existingDb) {
|
|
1085
|
+
await this._applySchemaSteps(existingDb)
|
|
1086
|
+
|
|
1087
|
+
return
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
await this._withDb((db) => this._applySchemaSteps(db))
|
|
1091
|
+
}
|
|
1092
|
+
const run = previous.then(applyWithConnection, applyWithConnection)
|
|
1088
1093
|
|
|
1089
1094
|
// Keep the chain alive regardless of this run's outcome so one failed apply does
|
|
1090
1095
|
// not wedge later callers; this run still propagates its own result/error.
|
|
@@ -6,9 +6,11 @@ import TestFilesFinder from "../../../../testing/test-files-finder.js"
|
|
|
6
6
|
import TestRunner from "../../../../testing/test-runner.js"
|
|
7
7
|
import TestSuiteSplitter from "../../../../testing/test-suite-splitter.js"
|
|
8
8
|
import {normalizeExamplePatterns, parseFilters} from "../../../../testing/test-filter-parser.js"
|
|
9
|
+
import {prepareSourcePeerPackage} from "../../source-peer-package.js"
|
|
9
10
|
|
|
10
11
|
export default class VelociousCliCommandsTest extends BaseCommand {
|
|
11
12
|
async execute() {
|
|
13
|
+
await prepareSourcePeerPackage()
|
|
12
14
|
this.getConfiguration().setEnvironment("test")
|
|
13
15
|
|
|
14
16
|
let directory
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import {randomUUID} from "node:crypto"
|
|
2
|
+
import fsSync from "node:fs"
|
|
3
|
+
import fs from "node:fs/promises"
|
|
4
|
+
import path from "node:path"
|
|
5
|
+
import {fileURLToPath} from "node:url"
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Invocation-owned source peer package shim.
|
|
9
|
+
* @typedef {object} SourcePeerPackage
|
|
10
|
+
* @property {() => Promise<void>} cleanup - Removes only this invocation's shim.
|
|
11
|
+
* @property {boolean} created - Whether this invocation created the shim.
|
|
12
|
+
* @property {string} packageDirectory - Package path used for peer resolution.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
const SOURCE_PEER_SHIM_MARKER_FILE = ".velocious-source-peer-shim"
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Checks a filesystem error code.
|
|
19
|
+
* @param {unknown} error - Filesystem error.
|
|
20
|
+
* @param {string} code - Expected Node error code.
|
|
21
|
+
* @returns {boolean} - Whether the error has the expected code.
|
|
22
|
+
*/
|
|
23
|
+
function errorHasCode(error, code) {
|
|
24
|
+
return error instanceof Error && "code" in error && error.code === code
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Resolves the Velocious package directory from source or compiled execution.
|
|
29
|
+
* @returns {Promise<string>} - Velocious package directory.
|
|
30
|
+
*/
|
|
31
|
+
async function frameworkPackageDirectory() {
|
|
32
|
+
const helperDirectory = path.dirname(fileURLToPath(import.meta.url))
|
|
33
|
+
const sourceLayoutDirectory = path.resolve(helperDirectory, "..", "..", "..")
|
|
34
|
+
|
|
35
|
+
try {
|
|
36
|
+
await fs.access(path.join(sourceLayoutDirectory, "package.json"))
|
|
37
|
+
|
|
38
|
+
return sourceLayoutDirectory
|
|
39
|
+
} catch (error) {
|
|
40
|
+
if (!errorHasCode(error, "ENOENT")) throw error
|
|
41
|
+
|
|
42
|
+
return path.dirname(sourceLayoutDirectory)
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Removes an invocation-owned shim asynchronously.
|
|
48
|
+
* @param {object} args - Cleanup ownership.
|
|
49
|
+
* @param {string} args.markerPath - Marker file path.
|
|
50
|
+
* @param {string} args.packageDirectory - Synthetic package directory.
|
|
51
|
+
* @param {string} args.token - Invocation ownership token.
|
|
52
|
+
* @returns {Promise<void>} - Resolves after owned cleanup.
|
|
53
|
+
*/
|
|
54
|
+
async function cleanupOwnedShim({markerPath, packageDirectory, token}) {
|
|
55
|
+
let marker
|
|
56
|
+
|
|
57
|
+
try {
|
|
58
|
+
marker = await fs.readFile(markerPath, "utf8")
|
|
59
|
+
} catch (error) {
|
|
60
|
+
if (errorHasCode(error, "ENOENT")) return
|
|
61
|
+
|
|
62
|
+
throw error
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (marker !== `${token}\n`) return
|
|
66
|
+
|
|
67
|
+
await fs.rm(packageDirectory, {recursive: true, force: true})
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Removes an invocation-owned shim during process exit.
|
|
72
|
+
* @param {object} args - Cleanup ownership.
|
|
73
|
+
* @param {string} args.markerPath - Marker file path.
|
|
74
|
+
* @param {string} args.packageDirectory - Synthetic package directory.
|
|
75
|
+
* @param {string} args.token - Invocation ownership token.
|
|
76
|
+
* @returns {void} - No return value.
|
|
77
|
+
*/
|
|
78
|
+
function cleanupOwnedShimSync({markerPath, packageDirectory, token}) {
|
|
79
|
+
let marker
|
|
80
|
+
|
|
81
|
+
try {
|
|
82
|
+
marker = fsSync.readFileSync(markerPath, "utf8")
|
|
83
|
+
} catch (error) {
|
|
84
|
+
if (errorHasCode(error, "ENOENT")) return
|
|
85
|
+
|
|
86
|
+
throw error
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (marker !== `${token}\n`) return
|
|
90
|
+
|
|
91
|
+
fsSync.rmSync(packageDirectory, {recursive: true, force: true})
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Exposes this checkout to published peer packages without loading duplicate
|
|
96
|
+
* classes from generated build output.
|
|
97
|
+
* @param {string} [projectDirectory] - Velocious source checkout.
|
|
98
|
+
* @returns {Promise<SourcePeerPackage>} - Invocation-owned shim handle.
|
|
99
|
+
*/
|
|
100
|
+
async function prepareSourcePeerPackage(projectDirectory) {
|
|
101
|
+
const resolvedProjectDirectory = projectDirectory ?? await frameworkPackageDirectory()
|
|
102
|
+
const nodeModulesDirectory = path.join(resolvedProjectDirectory, "node_modules")
|
|
103
|
+
const packageDirectory = path.join(nodeModulesDirectory, "velocious")
|
|
104
|
+
|
|
105
|
+
await fs.mkdir(nodeModulesDirectory, {recursive: true})
|
|
106
|
+
|
|
107
|
+
try {
|
|
108
|
+
await fs.mkdir(packageDirectory)
|
|
109
|
+
} catch (error) {
|
|
110
|
+
if (!errorHasCode(error, "EEXIST")) throw error
|
|
111
|
+
|
|
112
|
+
return {
|
|
113
|
+
cleanup: async () => {},
|
|
114
|
+
created: false,
|
|
115
|
+
packageDirectory
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const token = randomUUID()
|
|
120
|
+
const markerPath = path.join(packageDirectory, SOURCE_PEER_SHIM_MARKER_FILE)
|
|
121
|
+
const cleanupOnExit = () => cleanupOwnedShimSync({markerPath, packageDirectory, token})
|
|
122
|
+
let cleanupPromise
|
|
123
|
+
const cleanup = () => {
|
|
124
|
+
cleanupPromise ??= cleanupOwnedShim({markerPath, packageDirectory, token})
|
|
125
|
+
.then(() => process.removeListener("exit", cleanupOnExit))
|
|
126
|
+
|
|
127
|
+
return cleanupPromise
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
try {
|
|
131
|
+
const buildDirectory = path.join(packageDirectory, "build")
|
|
132
|
+
|
|
133
|
+
await fs.writeFile(markerPath, `${token}\n`, {encoding: "utf8", flag: "wx"})
|
|
134
|
+
process.once("exit", cleanupOnExit)
|
|
135
|
+
await fs.mkdir(buildDirectory)
|
|
136
|
+
await fs.writeFile(
|
|
137
|
+
path.join(packageDirectory, "package.json"),
|
|
138
|
+
`${JSON.stringify({name: "velocious", private: true, type: "module"}, null, 2)}\n`,
|
|
139
|
+
"utf8"
|
|
140
|
+
)
|
|
141
|
+
await fs.symlink(
|
|
142
|
+
path.join(resolvedProjectDirectory, "src"),
|
|
143
|
+
path.join(buildDirectory, "src"),
|
|
144
|
+
process.platform === "win32" ? "junction" : "dir"
|
|
145
|
+
)
|
|
146
|
+
} catch (error) {
|
|
147
|
+
process.removeListener("exit", cleanupOnExit)
|
|
148
|
+
await fs.rm(packageDirectory, {recursive: true, force: true})
|
|
149
|
+
throw error
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return {cleanup, created: true, packageDirectory}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Runs work while the source peer package is available.
|
|
157
|
+
* @template Result
|
|
158
|
+
* @param {string} projectDirectory - Velocious source checkout.
|
|
159
|
+
* @param {() => Promise<Result>} callback - Work requiring source peer resolution.
|
|
160
|
+
* @returns {Promise<Result>} - Callback result.
|
|
161
|
+
*/
|
|
162
|
+
async function withSourcePeerPackage(projectDirectory, callback) {
|
|
163
|
+
const sourcePeerPackage = await prepareSourcePeerPackage(projectDirectory)
|
|
164
|
+
|
|
165
|
+
try {
|
|
166
|
+
return await callback()
|
|
167
|
+
} finally {
|
|
168
|
+
await sourcePeerPackage.cleanup()
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export {SOURCE_PEER_SHIM_MARKER_FILE, frameworkPackageDirectory, prepareSourcePeerPackage, withSourcePeerPackage}
|
package/build/routes/resolver.js
CHANGED
|
@@ -18,39 +18,6 @@ function normalizeActionName(actionName) {
|
|
|
18
18
|
return inflection.camelize(actionName.replaceAll("-", "_").replaceAll("/", "_"), true)
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
/**
|
|
22
|
-
* Runs missing module specifier from error.
|
|
23
|
-
* @param {Error} error - Import error.
|
|
24
|
-
* @returns {string | undefined} - Missing module specifier from an ERR_MODULE_NOT_FOUND message.
|
|
25
|
-
*/
|
|
26
|
-
function missingModuleSpecifierFromError(error) {
|
|
27
|
-
const firstLine = error.message.split("\n")[0] || ""
|
|
28
|
-
const match = firstLine.match(/^Cannot find (?:module|package) ['"](.+?)['"] imported from /)
|
|
29
|
-
|
|
30
|
-
return match?.[1]
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Runs is missing target module error.
|
|
35
|
-
* @param {object} args - Arguments.
|
|
36
|
-
* @param {Error} args.error - Import error.
|
|
37
|
-
* @param {string} args.targetPath - Target controller path.
|
|
38
|
-
* @param {string} args.targetImportSpecifier - Target controller import specifier.
|
|
39
|
-
* @returns {boolean} - True when the missing module is the target controller file.
|
|
40
|
-
*/
|
|
41
|
-
function isMissingTargetModuleError({error, targetPath, targetImportSpecifier}) {
|
|
42
|
-
const ensuredError = ensureError(error)
|
|
43
|
-
const isModuleNotFoundError = "code" in ensuredError && ensuredError.code === "ERR_MODULE_NOT_FOUND"
|
|
44
|
-
|
|
45
|
-
if (!isModuleNotFoundError) return false
|
|
46
|
-
|
|
47
|
-
const missingSpecifier = missingModuleSpecifierFromError(ensuredError)
|
|
48
|
-
|
|
49
|
-
if (!missingSpecifier) return false
|
|
50
|
-
|
|
51
|
-
return missingSpecifier === targetPath || missingSpecifier === targetImportSpecifier
|
|
52
|
-
}
|
|
53
|
-
|
|
54
21
|
export default class VelociousRoutesResolver {
|
|
55
22
|
/**
|
|
56
23
|
* Narrows the runtime value to the documented type.
|
|
@@ -274,25 +241,11 @@ export default class VelociousRoutesResolver {
|
|
|
274
241
|
* @returns {Promise<typeof import("../controller.js").default>} - The resolved controller class.
|
|
275
242
|
*/
|
|
276
243
|
async resolveControllerClass({controllerPath}) {
|
|
277
|
-
|
|
244
|
+
if (this.routeHookControllerClass) return this.routeHookControllerClass
|
|
278
245
|
|
|
279
|
-
|
|
280
|
-
return /** @type {typeof import("../controller.js").default} */ ((await import(controllerImportSpecifier)).default)
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
try {
|
|
284
|
-
return /** @type {typeof import("../controller.js").default} */ ((await import(controllerImportSpecifier)).default)
|
|
285
|
-
} catch (error) {
|
|
286
|
-
const isMissingControllerFileError = isMissingTargetModuleError({
|
|
287
|
-
error: ensureError(error),
|
|
288
|
-
targetImportSpecifier: controllerImportSpecifier,
|
|
289
|
-
targetPath: controllerPath
|
|
290
|
-
})
|
|
291
|
-
|
|
292
|
-
if (!isMissingControllerFileError) throw ensureError(error)
|
|
246
|
+
const controllerImportSpecifier = toImportSpecifier(controllerPath)
|
|
293
247
|
|
|
294
|
-
|
|
295
|
-
}
|
|
248
|
+
return /** @type {typeof import("../controller.js").default} */ ((await import(controllerImportSpecifier)).default)
|
|
296
249
|
}
|
|
297
250
|
|
|
298
251
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/background-jobs/main.js"],"names":[],"mappings":"AAsDA;IACE;;;;;;;;;;OAUG;IACH,mIARG;QAAoD,aAAa,EAAzD,OAAO,qBAAqB,EAAE,OAAO;QACvB,IAAI;QACJ,IAAI;QACJ,oBAAoB;QACpB,qBAAqB;QACpB,8BAA8B;QACX,SAAS,UAArC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;KACpC,EA+EA;IA7EC,qDAAkC;IAClC,wCAAoE;IACpE,kBALe,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,cAKT;IAE1B,aAA+B;IAC/B,aAAyD;IACzD,qFAA+C;IAC/C,uBAA2C;IAC3C,uKAAiC;IAGjC,6BAAkJ;IAClJ,8BAAuJ;IACvJ,2BAAoG;IACpG,eAA8B;IAC9B;;iCAE6B;IAC7B,SADU,GAAG,CAAC,UAAU,CAAC,CACD;IACxB;;iCAE6B;IAC7B,cADU,GAAG,CAAC,UAAU,CAAC,CACI;IAC7B;;sDAEkD;IAClD,gBADU,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CACf;IAC/B;;;oCAGgC;IAChC,gCADU,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CACmB;IAC/C;;wCAEoC;IACpC,QADU,GAAG,CAAC,MAAM,GAAG,SAAS,CACT;IACvB;;2DAEuD;IACvD,YADU,UAAU,CAAC,OAAO,UAAU,CAAC,GAAG,SAAS,CACxB;IAC3B;;2DAEuD;IACvD,iBADU,UAAU,CAAC,OAAO,UAAU,CAAC,GAAG,SAAS,CACnB;IAChC;;2DAEuD;IACvD,kBADU,UAAU,C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B;IAED;;;OAGG;IACH,+BAFa,OAAO,CAOnB;IAED;;;OAGG;IACH,mBAFa,OAAO,CAAC,OAAO,CAAC,CAQ5B;IAED;;;OAGG;IACH,iBAFa,OAAO,CAAC,OAAO,CAAC,CAW5B;IAED;;;OAGG;IACH,6BAFa,OAAO,CAAC,OAAO,CAAC,CAU5B;IAED;;;;;;OAMG;IACH,uBAFa,IAAI,CAWhB;IAED;;;OAGG;IACH,oBAFa,OAAO,CAAC,IAAI,CAAC,CAgBzB;IAED;;;;OAIG;IACH,cAFa,OAAO,CAAC,IAAI,CAAC,CAuDzB;IAED;;;OAGG;IACH,mCAFa,OAAO,CAAC,OAAO,YAAY,EAAE,gBAAgB,GAAG,IAAI,CAAC,CASjE;IAED;;;OAGG;IACH,6BAFa,OAAO,YAAY,EAAE,0BAA0B,EAAE,CAU7D;IAED;;;;;;OAMG;IACH,uDAJG;QAAmE,cAAc,EAAzE,GAAG,CAAC,OAAO,YAAY,EAAE,0BAA0B,CAAC;QACnC,MAAM,EAAvB,UAAU;KAClB,GAAU,IAAI,CAQhB;IAED;;;;OAIG;IACH,uBAHW,OAAO,YAAY,EAAE,gBAAgB,GACnC,UAAU,GAAG,SAAS,CAMlC;IAED;;;;;;OAMG;IACH,mCAJG;QAAoD,GAAG,EAA/C,OAAO,YAAY,EAAE,gBAAgB;QACpB,MAAM,EAAvB,UAAU;KAClB,GAAU,OAAO,CAUnB;IAED;;;;;;OAMG;IACH,sBAFa,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/background-jobs/main.js"],"names":[],"mappings":"AAsDA;IACE;;;;;;;;;;OAUG;IACH,mIARG;QAAoD,aAAa,EAAzD,OAAO,qBAAqB,EAAE,OAAO;QACvB,IAAI;QACJ,IAAI;QACJ,oBAAoB;QACpB,qBAAqB;QACpB,8BAA8B;QACX,SAAS,UAArC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;KACpC,EA+EA;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