@coreframe/deploy 0.1.18 → 3.0.0-beta.1
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/dist/reviewer.js +1 -1
- package/package.json +3 -3
package/dist/reviewer.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{importProjectModule as e}from"@coreframe/config";async function t(t,n,r,i){if(!t.reviewer)return;let a=`${t.environment.toUpperCase()}_REVIEWER_`,o=e=>{let t=i[
|
|
1
|
+
import{importProjectModule as e}from"@coreframe/config";async function t(t,n,r,i){if(!t.reviewer)return;let a=`${t.environment.toUpperCase()}_REVIEWER_`,o=e=>{let t=i[e];if(!t?.trim())throw Error(`${e} is required for reviewer deployment.`);return t},s=new URL(r);if(s.protocol!==`https:`||s.username||s.password)throw Error(`Reviewer verification requires a public HTTPS deployment URL without credentials.`);let c=n.database?.dialect??`postgres`,l=c===`sqlite`&&i.TURSO_DATABASE_URL!==void 0?`TURSO_DATABASE_URL`:`DATABASE_URL`,u=o(l),d;try{d=new URL(u).protocol}catch{throw Error(`${l} must be a valid deployment database URL.`)}if(!(c===`postgres`?[`postgres:`,`postgresql:`]:[`libsql:`,`https:`,`wss:`]).includes(d))throw Error(`${l} must target a deployed ${c} database; local files are not supported.`);let f=c===`postgres`?{DATABASE_URL:u}:{TURSO_DATABASE_URL:u,TURSO_AUTH_TOKEN:o(`TURSO_AUTH_TOKEN`)},p={environment:t.environment,url:r,dialect:c,env:f,email:o(a+`EMAIL`).trim().toLowerCase(),password:o(a+`PASSWORD`)};if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p.email))throw Error(`${a}EMAIL must be an email address.`);let m;try{if(m=await e(t.reviewer.entrypoint),![m.validate,m.provision,m.verify].every(e=>typeof e==`function`))throw Error(`Invalid reviewer module`);await m.validate(p)}catch{throw Error(`Reviewer setup failed for ${t.environment}; check reviewer.entrypoint exports and app-specific validation. Secret details suppressed.`)}return{async run(e){let n={...e,...p},r=`provision`;try{let e=await m.provision(n);if(!e?.userId)throw Error(`Missing reviewer identity`);r=`verify`,await m.verify(n,e)}catch{throw Error(`Worker deployment succeeded, but reviewer ${r} failed for ${t.environment}. Check dedicated identity ownership, disabled state, credential consistency, and app readiness. Secret details suppressed.`)}}}}export{t as prepareReviewerDeploy};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coreframe/deploy",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "3.0.0-beta.1",
|
|
4
4
|
"description": "Deployment configuration, validation, and release utilities for Coreframe apps",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
+
"@coreframe/config": "3.0.0-beta.1",
|
|
21
22
|
"json5": "^2.2.3",
|
|
22
23
|
"nano-spawn": "^2.1.0",
|
|
23
|
-
"tinyglobby": "^0.2.17"
|
|
24
|
-
"@coreframe/config": "^0.1.17"
|
|
24
|
+
"tinyglobby": "^0.2.17"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/node": "^26.1.0",
|