@ibgib/space-gib 0.0.14 → 0.0.17
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/client/bootstrap.mjs +34 -35
- package/dist/client/chunk-O4TTY4VM.mjs +2507 -0
- package/dist/client/chunk-YHOY7AVR.mjs +18 -0
- package/dist/client/index.mjs +14 -14
- package/dist/client/script.mjs +1 -2
- package/dist/server/server.mjs +2642 -1767
- package/package.json +5 -5
- package/src/client/AUTO-GENERATED-version.mts +1 -1
- package/src/client/bootstrap.mts +18 -2
- package/src/server/server.mts +16 -4
- package/dist/client/bootstrap.mjs.map +0 -7
- package/dist/client/chunk-AOGR25NW.mjs +0 -19
- package/dist/client/chunk-AOGR25NW.mjs.map +0 -7
- package/dist/client/chunk-SXMTWH6R.mjs +0 -2357
- package/dist/client/chunk-SXMTWH6R.mjs.map +0 -7
- package/dist/client/index.mjs.map +0 -7
- package/dist/client/script.mjs.map +0 -7
- package/dist/server/server.mjs.map +0 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibgib/space-gib",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "ibgib storage and provider service — SaaS at ibgib.space",
|
|
6
6
|
"scripts": {
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
"build:test": "tsc -p tsconfig.test.json"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@ibgib/core-gib": "^0.1.
|
|
16
|
-
"@ibgib/helper-gib": "^0.0.
|
|
15
|
+
"@ibgib/core-gib": "^0.1.73",
|
|
16
|
+
"@ibgib/helper-gib": "^0.0.37",
|
|
17
17
|
"@ibgib/ts-gib": "^0.5.33",
|
|
18
|
-
"@ibgib/web-gib": "^0.0.
|
|
19
|
-
"@ibgib/node-gib": "^0.0.
|
|
18
|
+
"@ibgib/web-gib": "^0.0.59",
|
|
19
|
+
"@ibgib/node-gib": "^0.0.18"
|
|
20
20
|
},
|
|
21
21
|
"engines": {
|
|
22
22
|
"node": ">=20.0.0"
|
package/src/client/bootstrap.mts
CHANGED
|
@@ -34,8 +34,24 @@ if (urlParams.has('code') && urlParams.has('state') && window.opener) {
|
|
|
34
34
|
|
|
35
35
|
console.log(`[space-gib bootstrap] version: ${AUTO_GENERATED_VERSION}`);
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
const clientProfiles = [
|
|
38
|
+
process.env.KEYSTONE_PROFILE_SOVEREIGN_PRIMARY,
|
|
39
|
+
process.env.KEYSTONE_PROFILE_SOVEREIGN_SYNC,
|
|
40
|
+
process.env.KEYSTONE_PROFILE_CUSTODIAN_SYNC,
|
|
41
|
+
].filter(Boolean) as string[];
|
|
42
|
+
|
|
43
|
+
const isProdEnv = process.env.NODE_ENV === 'production';
|
|
44
|
+
const hasDevProfile = clientProfiles.some(p => p.endsWith('.dev'));
|
|
45
|
+
const hasStagingProfile = clientProfiles.some(p => p.endsWith('.staging'));
|
|
46
|
+
|
|
47
|
+
if (isProdEnv && (hasDevProfile || hasStagingProfile)) {
|
|
48
|
+
throw new Error(`Security Violation: Non-production keystone profiles are prohibited when NODE_ENV=production. Active client profiles: ${clientProfiles.join(', ')}. (E: 7a8b9c0d1e2f3456789abcdef0123456)`);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (hasDevProfile) {
|
|
52
|
+
console.warn(`%c⚠️ WARNING: DEVELOPMENT KEYSTONE PROFILE ACTIVE (.dev)!\nGENERATED KEYSTONES USE LOW-SECURITY DEV PARAMETERS FOR RAPID TESTING.\nFOR LOCAL TESTING ONLY — DO NOT USE FOR REAL SECRETS OR PRODUCTION DATA!`, 'background: #990000; color: #ffffff; font-size: 14px; font-weight: bold; padding: 8px; border-radius: 4px;');
|
|
53
|
+
} else if (hasStagingProfile) {
|
|
54
|
+
console.info(`%cℹ️ STAGING KEYSTONE PROFILE ACTIVE (.staging)`, 'background: #005599; color: #ffffff; font-size: 13px; font-weight: bold; padding: 6px; border-radius: 4px;');
|
|
39
55
|
}
|
|
40
56
|
|
|
41
57
|
// ---------------------------------------------------------------------------
|
package/src/server/server.mts
CHANGED
|
@@ -38,10 +38,22 @@ async function main(): Promise<void> {
|
|
|
38
38
|
console.log(`${lc} starting...`);
|
|
39
39
|
console.log(`${lc} dataDir: ${DATA_DIR}`);
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
const custodianPrimaryProfile = (process.env.KEYSTONE_PROFILE_CUSTODIAN_PRIMARY || '').trim();
|
|
42
|
+
if (!custodianPrimaryProfile) {
|
|
43
|
+
throw new Error(`${lc} Fatal Error: KEYSTONE_PROFILE_CUSTODIAN_PRIMARY environment variable is missing or blank. (E: 8a9b0c1d2e3f4567890123456789abcd)`);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const isProdEnv = process.env.NODE_ENV === 'production';
|
|
47
|
+
if (isProdEnv && !custodianPrimaryProfile.endsWith('.prod')) {
|
|
48
|
+
throw new Error(`${lc} Security Violation: Non-production keystone profile '${custodianPrimaryProfile}' is prohibited when NODE_ENV=production. (E: 9b0c1d2e3f4567890123456789abcdef)`);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
console.log(`${lc} KEYSTONE_PROFILE_CUSTODIAN_PRIMARY: ${custodianPrimaryProfile} (I: 961014e2dd082293b83b917835c97e26)`);
|
|
52
|
+
|
|
53
|
+
if (custodianPrimaryProfile.endsWith('.dev')) {
|
|
54
|
+
console.warn(`\n==========================================================\n⚠️ WARNING: CUSTODIAN KEYSTONE PROFILE IS SET TO DEVELOPMENT ('${custodianPrimaryProfile}')!\nCUSTODIAL KEYSTONES WILL USE LOW-SECURITY DEV PARAMETERS.\nFOR LOCAL TESTING ONLY — DO NOT USE FOR REAL SECRETS OR PRODUCTION DATA!\n==========================================================\n (W: 890123456789abcdef0123456789a123)`);
|
|
55
|
+
} else if (custodianPrimaryProfile.endsWith('.staging')) {
|
|
56
|
+
console.info(`${lc} ℹ️ STAGING CUSTODIAN KEYSTONE PROFILE ACTIVE ('${custodianPrimaryProfile}')`);
|
|
45
57
|
}
|
|
46
58
|
|
|
47
59
|
const syncUpgradeHandler = new SyncUpgradeHandler();
|