@proteinjs/user 1.10.2 → 1.11.0
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/CHANGELOG.md +22 -0
- package/dist/src/MachineAccount.d.ts.map +1 -1
- package/dist/src/MachineAccount.js +8 -1
- package/dist/src/MachineAccount.js.map +1 -1
- package/dist/src/tables/UserTable.d.ts +2 -0
- package/dist/src/tables/UserTable.d.ts.map +1 -1
- package/dist/src/tables/UserTable.js +4 -2
- package/dist/src/tables/UserTable.js.map +1 -1
- package/package.json +5 -5
- package/src/MachineAccount.ts +8 -4
- package/src/tables/UserTable.ts +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.11.0](https://github.com/proteinjs/user/compare/@proteinjs/user@1.10.3...@proteinjs/user@1.11.0) (2026-08-28)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* hide password-reset token columns from the generic record UI — auth-internal state (server write paths only) has no business on the admin user table or form; ui.hidden at the schema like password ([4e61728](https://github.com/proteinjs/user/commit/4e6172866cf291b8e476001cf2c39f933a72b4fb))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [1.10.3](https://github.com/proteinjs/user/compare/@proteinjs/user@1.10.2...@proteinjs/user@1.10.3) (2026-08-26)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* MachineAccounts harness meets db >=1.34.4 — getMachineAccounts maps the new {source, loader} declaration pairs; the test seeds namedObjectCache beside objectCache (objectsWithNames reads only the former — user's next CI red without this); the removal case models IN-PACKAGE removal (a surviving sibling declaration) per the ownership law boot([]) now deliberately protects. HONEST RESIDUE: the re-declare-after-removal leg still reds (sync INSERTs the existing machine-test-ops row instead of adopting — the new sync's adopt query vs the deactivated row's stamps; a user+db semantics call for the mint owners, exact repro in this suite) — 10/11 green, was 1/11 at origin/main against db 1.34.4 ([895f5fe](https://github.com/proteinjs/user/commit/895f5fedf47064299f184e7a2a14068bd7acbdd0))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## [1.10.2](https://github.com/proteinjs/user/compare/@proteinjs/user@1.10.1...@proteinjs/user@1.10.2) (2026-08-26)
|
|
7
29
|
|
|
8
30
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MachineAccount.d.ts","sourceRoot":"","sources":["../../src/MachineAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAA0B,MAAM,eAAe,CAAC;AAGlF,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,QAAO,cAAc,
|
|
1
|
+
{"version":3,"file":"MachineAccount.d.ts","sourceRoot":"","sources":["../../src/MachineAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAA0B,MAAM,eAAe,CAAC;AAGlF,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,QAAO,cAAc,EAQ/C,CAAC;AAEN;;;;;;;;;;;;;;GAcG;AACH,8BAAsB,cAAe,YAAW,kBAAkB,CAAC,IAAI,CAAC;IACtE,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,gGAAgG;IAChG,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,iEAAiE;IACjE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,CAAC,CAEvB;IAED,IAAI,MAAM,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAkB/C;IAED,wFAAwF;IACxF,OAAO,CAAC,QAAQ;CA2BjB"}
|
|
@@ -19,7 +19,14 @@ var tables_1 = require("./tables/tables");
|
|
|
19
19
|
* a user-table source-record declaration carrying a `secretName` is a machine account.
|
|
20
20
|
*/
|
|
21
21
|
var getMachineAccounts = function () {
|
|
22
|
-
return (0, db_1.getSourceRecordLoaders)()
|
|
22
|
+
return (0, db_1.getSourceRecordLoaders)()
|
|
23
|
+
// db ≥1.34.4 pairs each loader with its owning source package (the shared-db ownership
|
|
24
|
+
// grain); the machine-account read wants the loaders themselves.
|
|
25
|
+
.map(function (_a) {
|
|
26
|
+
var loader = _a.loader;
|
|
27
|
+
return loader;
|
|
28
|
+
})
|
|
29
|
+
.filter(function (loader) {
|
|
23
30
|
return loader.table.name === tables_1.tables.User.name && typeof loader.secretName === 'string';
|
|
24
31
|
});
|
|
25
32
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MachineAccount.js","sourceRoot":"","sources":["../../src/MachineAccount.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oCAAkF;AAClF,+CAA8C;AAC9C,0CAAyC;AAGzC;;;;GAIG;AACI,IAAM,kBAAkB,GAAG;IAChC,OAAA,IAAA,2BAAsB,GAAQ,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"MachineAccount.js","sourceRoot":"","sources":["../../src/MachineAccount.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oCAAkF;AAClF,+CAA8C;AAC9C,0CAAyC;AAGzC;;;;GAIG;AACI,IAAM,kBAAkB,GAAG;IAChC,OAAA,IAAA,2BAAsB,GAAQ;QAC5B,uFAAuF;QACvF,iEAAiE;SA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KAAK,CAAC,WAAW,EAAE,EAAE;YAC3C,MAAM,IAAI,KAAK,CACb,UAAG,QAAQ,8BAAoB,IAAI,CAAC,KAAK,uDAA+C;gBACtF,kFAAkF,CACrF,CAAC;SACH;QAED,KAAmB,UAAU,EAAV,KAAA,IAAI,CAAC,KAAK,EAAV,cAAU,EAAV,IAAU,EAAE;YAA1B,IAAM,IAAI,SAAA;YACb,IAAM,KAAK,GAAG,2BAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC1C,IAAI,CAAC,KAAK,EAAE;gBACV,MAAM,IAAI,KAAK,CAAC,UAAG,QAAQ,qCAA2B,IAAI,6CAAqC,CAAC,CAAC;aAClG;YAED,IAAI,KAAK,CAAC,UAAU,EAAE;gBACpB,MAAM,IAAI,KAAK,CACb,UAAG,QAAQ,yCAA+B,IAAI,+CAAuC;oBACnF,iDAAiD,CACpD,CAAC;aACH;SACF;IACH,CAAC;IACH,qBAAC;AAAD,CAAC,AAvED,IAuEC;AAvEqB,wCAAc"}
|
|
@@ -64,6 +64,8 @@ export declare class UserTable extends Table<User> {
|
|
|
64
64
|
sourceRecordOptions: Table<User>['sourceRecordOptions'];
|
|
65
65
|
columns: {
|
|
66
66
|
isLoadedFromSource: import("@proteinjs/db").Column<boolean | undefined, any>;
|
|
67
|
+
sourcePackage: import("@proteinjs/db").Column<string | undefined, any>;
|
|
68
|
+
sourcePackageVersion: import("@proteinjs/db").Column<string | undefined, any>;
|
|
67
69
|
id: import("@proteinjs/db").Column<string, any>;
|
|
68
70
|
created: import("@proteinjs/db").Column<Moment, any>;
|
|
69
71
|
updated: import("@proteinjs/db").Column<Moment, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserTable.d.ts","sourceRoot":"","sources":["../../../src/tables/UserTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,EACL,YAAY,EAGb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,C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= /** @class */ (function (_super) {
|
|
|
114
114
|
*/
|
|
115
115
|
email: new db_1.StringColumn('email', { unique: { unique: true, indexName: 'user_email_unique' } }, 250),
|
|
116
116
|
password: new db_1.PasswordColumn('password'),
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
// Auth-internal reset-token state: server write paths only — no admin surface (table or
|
|
118
|
+
// form) has business rendering it, so it hides from the generic record UI like `password`.
|
|
119
|
+
passwordResetToken: new db_1.StringColumn('password_reset_token', { ui: { hidden: true } }),
|
|
120
|
+
passwordResetTokenExpiration: new db_1.DateTimeColumn('password_reset_token_expiration', { ui: { hidden: true } }),
|
|
119
121
|
emailVerified: new db_1.BooleanColumn('email_verified'),
|
|
120
122
|
/**
|
|
121
123
|
* Typed array in the `role_list` column. The legacy comma-string `roles` column (STRING(255))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserTable.js","sourceRoot":"","sources":["../../../src/tables/UserTable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oCASuB;AAEvB,8CAAkD;AAElD,mHAAmH;AACtG,QAAA,aAAa,GAAG,CAAC,QAAQ,EAAE,aAAa,CAAU,CAAC;AA2ChE;IAA+B,6BAAW;IAA1C;QAAA,
|
|
1
|
+
{"version":3,"file":"UserTable.js","sourceRoot":"","sources":["../../../src/tables/UserTable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oCASuB;AAEvB,8CAAkD;AAElD,mHAAmH;AACtG,QAAA,aAAa,GAAG,CAAC,QAAQ,EAAE,aAAa,CAAU,CAAC;AA2ChE;IAA+B,6BAAW;IAA1C;QAAA,qEAyEC;QAxEC,UAAI,GAAG,MAAM,CAAC;QACd;;;;;;;WAOG;QACH,UAAI,GAAwB;YAC1B,EAAE,EAAE;gBACF,KAAK,EAAE,EAAE,UAAU,EAAE,8BAAg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,EAAE,IAAI,mBAAc,CAAC,iCAAiC,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC;YAC7G,aAAa,EAAE,IAAI,kBAAa,CAAC,gBAAgB,CAAC;YAClD;;;;eAIG;YACH,KAAK,EAAE,IAAI,gBAAW,CAAS,WAAW,CAAC;YAC3C,SAAS,EAAE,IAAI,iBAAY,CAAC,YAAY,CAAC;YACzC,WAAW,EAAE,IAAI,iBAAY,CAAC,cAAc,CAAC;YAC7C,YAAY,EAAE,IAAI,iBAAY,CAAC,gBAAgB,CAAC;YAChD,MAAM,EAAE,IAAI,iBAAY,CAAa,QAAQ,EAAE,EAAE,YAAY,EAAE;oBAAY,sBAAA,QAAQ,EAAA;yBAAA,EAAE,EAAE,EAAE,CAAC;YAC1F,iBAAiB,EAAE,IAAI,mBAAc,CAAC,qBAAqB,CAAC;YAC5D,UAAU,EAAE,IAAI,mBAAc,CAAC,aAAa,CAAC;SAC9C,CAAC,CAAC;;IACL,CAAC;IAAD,gBAAC;AAAD,CAAC,AAzED,CAA+B,UAAK,GAyEnC;AAzEY,8BAAS"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proteinjs/user",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"description": "User management",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"test": "jest --runInBand --passWithNoTests"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@proteinjs/db": "^1.
|
|
26
|
-
"@proteinjs/reflection": "^1.
|
|
25
|
+
"@proteinjs/db": "^1.35.0",
|
|
26
|
+
"@proteinjs/reflection": "^1.2.0",
|
|
27
27
|
"@proteinjs/server-api": "^3.0.11",
|
|
28
28
|
"@proteinjs/service": "^1.5.1",
|
|
29
|
-
"@proteinjs/user-auth": "^1.3.
|
|
29
|
+
"@proteinjs/user-auth": "^1.3.3",
|
|
30
30
|
"moment": "2.29.4"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
},
|
|
46
46
|
"main": "./dist/generated/index.js",
|
|
47
47
|
"types": "./dist/generated/index.d.ts",
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "2b32b5defb880fe162a0943beed787429430a167"
|
|
49
49
|
}
|
package/src/MachineAccount.ts
CHANGED
|
@@ -9,10 +9,14 @@ import { User } from './tables/UserTable';
|
|
|
9
9
|
* a user-table source-record declaration carrying a `secretName` is a machine account.
|
|
10
10
|
*/
|
|
11
11
|
export const getMachineAccounts = (): MachineAccount[] =>
|
|
12
|
-
getSourceRecordLoaders<User>()
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
getSourceRecordLoaders<User>()
|
|
13
|
+
// db ≥1.34.4 pairs each loader with its owning source package (the shared-db ownership
|
|
14
|
+
// grain); the machine-account read wants the loaders themselves.
|
|
15
|
+
.map(({ loader }) => loader)
|
|
16
|
+
.filter(
|
|
17
|
+
(loader): loader is MachineAccount =>
|
|
18
|
+
loader.table.name === tables.User.name && typeof (loader as MachineAccount).secretName === 'string'
|
|
19
|
+
);
|
|
16
20
|
|
|
17
21
|
/**
|
|
18
22
|
* A code-declared machine account: identity in source, credentials at runtime.
|
package/src/tables/UserTable.ts
CHANGED
|
@@ -110,8 +110,10 @@ export class UserTable extends Table<User> {
|
|
|
110
110
|
*/
|
|
111
111
|
email: new StringColumn('email', { unique: { unique: true, indexName: 'user_email_unique' } }, 250),
|
|
112
112
|
password: new PasswordColumn('password'),
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
// Auth-internal reset-token state: server write paths only — no admin surface (table or
|
|
114
|
+
// form) has business rendering it, so it hides from the generic record UI like `password`.
|
|
115
|
+
passwordResetToken: new StringColumn('password_reset_token', { ui: { hidden: true } }),
|
|
116
|
+
passwordResetTokenExpiration: new DateTimeColumn('password_reset_token_expiration', { ui: { hidden: true } }),
|
|
115
117
|
emailVerified: new BooleanColumn('email_verified'),
|
|
116
118
|
/**
|
|
117
119
|
* Typed array in the `role_list` column. The legacy comma-string `roles` column (STRING(255))
|