@7365admin1/core 3.52.1-staging.233 → 3.52.2-staging.234
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/.changeset/mailer-transport-defaults.md +5 -0
- package/CHANGELOG.md +18 -0
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/test/config-defaults.test.mjs +77 -0
- package/.changeset/onboarding-org-update-reach.md +0 -17
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@7365admin1/core": patch
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Fix the mailer transport defaults: an unset or unparseable port no longer resolves to `NaN`, and `MAILER_TRANSPORT_SECURE` now defaults to match the port instead of a fixed `false`. Same `Number(...) ?? n` fix applied to `PORT` and `REDIS_PORT`.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @iservice365/core
|
|
2
2
|
|
|
3
|
+
## 3.52.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a90696f: Let a client owner save their organisation details during onboarding.
|
|
8
|
+
|
|
9
|
+
`PUT /api/organizations/:id` — the write behind step 1 of the onboarding wizard —
|
|
10
|
+
was gated on `requireOrgAccess` (staff, or a live member of the organisation).
|
|
11
|
+
The client owner has no `members` row at that point; theirs is created at the
|
|
12
|
+
last step of the wizard. Every new client therefore got 401 on the first step of
|
|
13
|
+
onboarding and could not leave it.
|
|
14
|
+
|
|
15
|
+
The gate is now `requireOrgReach`: staff, a live member, **or** somebody holding
|
|
16
|
+
an invitation naming that organisation — the same rule the roles, members and
|
|
17
|
+
invite endpoints already use for the three pre-membership flows. Nothing is
|
|
18
|
+
widened: a member of another client, and a caller holding only a password-reset
|
|
19
|
+
row, are still refused.
|
|
20
|
+
|
|
3
21
|
## 3.52.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
package/dist/index.js
CHANGED
|
@@ -11545,11 +11545,11 @@ var dotenv = __toESM(require("dotenv"));
|
|
|
11545
11545
|
dotenv.config();
|
|
11546
11546
|
var MONGO_URI = process.env.MONGO_URI ?? "mongodb://localhost:27017";
|
|
11547
11547
|
var MONGO_DB = process.env.MONGO_DB ?? "default";
|
|
11548
|
-
var PORT = Number(process.env.PORT)
|
|
11548
|
+
var PORT = Number(process.env.PORT) || 3e3;
|
|
11549
11549
|
var isDev = process.env.NODE_ENV !== "production";
|
|
11550
11550
|
var MAILER_TRANSPORT_HOST = process.env.MAILER_TRANSPORT_HOST ?? "smtp.gmail.com";
|
|
11551
|
-
var MAILER_TRANSPORT_PORT = Number(process.env.MAILER_TRANSPORT_PORT)
|
|
11552
|
-
var MAILER_TRANSPORT_SECURE = process.env.MAILER_TRANSPORT_SECURE === "true";
|
|
11551
|
+
var MAILER_TRANSPORT_PORT = Number(process.env.MAILER_TRANSPORT_PORT) || 465;
|
|
11552
|
+
var MAILER_TRANSPORT_SECURE = process.env.MAILER_TRANSPORT_SECURE ? process.env.MAILER_TRANSPORT_SECURE === "true" : MAILER_TRANSPORT_PORT === 465;
|
|
11553
11553
|
var MAILER_EMAIL = process.env.MAILER_EMAIL ?? "default@gmail.com";
|
|
11554
11554
|
var MAILER_PASSWORD = process.env.MAILER_PASSWORD ?? "password";
|
|
11555
11555
|
var MAILER_FROM_EMAIL = process.env.MAILER_FROM_EMAIL || void 0;
|
|
@@ -11564,7 +11564,7 @@ var APP_ACCOUNT = process.env.APP_ACCOUNT ?? "http://localhost:3000";
|
|
|
11564
11564
|
var VERIFICATION_FORGET_PASSWORD_DURATION = process.env.VERIFICATION_FORGET_PASSWORD_DURATION ?? "10 minutes";
|
|
11565
11565
|
var VERIFICATION_USER_INVITE_DURATION = process.env.VERIFICATION_USER_INVITE_DURATION ?? "3 days";
|
|
11566
11566
|
var REDIS_HOST = process.env.REDIS_HOST ?? "localhost";
|
|
11567
|
-
var REDIS_PORT = Number(process.env.REDIS_PORT)
|
|
11567
|
+
var REDIS_PORT = Number(process.env.REDIS_PORT) || 6379;
|
|
11568
11568
|
var REDIS_PASSWORD = process.env.REDIS_PASSWORD ?? "password";
|
|
11569
11569
|
var DEFAULT_USER_EMAIL = process.env.DEFAULT_USER_EMAIL ?? "";
|
|
11570
11570
|
var DEFAULT_USER_PASSWORD = process.env.DEFAULT_USER_PASSWORD ?? "";
|