@ztimson/momentum 1.5.1 → 1.5.3
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 +1 -3
- package/dist/auth.d.ts +13 -2
- package/dist/auth.d.ts.map +1 -1
- package/dist/index.js +5054 -4581
- package/dist/index.mjs +4931 -4502
- package/dist/logger.d.ts +5 -20
- package/dist/logger.d.ts.map +1 -1
- package/package.json +11 -8
package/README.md
CHANGED
|
@@ -40,9 +40,7 @@
|
|
|
40
40
|
|
|
41
41
|
## About
|
|
42
42
|
|
|
43
|
-
https://
|
|
44
|
-
|
|
45
|
-
Momentum is a self-hosted _Enterprise Resource Planning_ (ERP) tool with a _content managment system_ (CMS). What does that mean? We can automate your businesses day-to-day operations and give you a pretty interface to control it by storing & coordinating your data & information; from any location or server.
|
|
43
|
+
[Momentum](https://git.zakscode.com/ztimson/momentum) is a self-hosted _Enterprise Resource Planning_ (ERP) tool with a _content managment system_ (CMS). What does that mean? We can automate your businesses day-to-day operations and give you a pretty interface to control it by storing & coordinating your data & information; from any location or server.
|
|
46
44
|
|
|
47
45
|
While several businesses might deliver the same final product as your business, what sets you apart is your institutional knowledge and unique execution. However, most of this is
|
|
48
46
|
lost when businesses are forced to conform to software and not the other way around. This is where Momentum is different.
|
package/dist/auth.d.ts
CHANGED
|
@@ -28,7 +28,16 @@ export declare class Auth extends PathEventEmitter {
|
|
|
28
28
|
/** Update user info without changing the session */
|
|
29
29
|
set user(user: User | null | undefined);
|
|
30
30
|
constructor(momentum: Momentum);
|
|
31
|
-
|
|
31
|
+
/**
|
|
32
|
+
* Handle login flow automatically:
|
|
33
|
+
* 1. Check for URL token and use if provided
|
|
34
|
+
* 2. Check server for session (retrieve cookie)
|
|
35
|
+
* 3. Open SSO login
|
|
36
|
+
* 4. Handle redirects/events
|
|
37
|
+
* @param {boolean | string} reload - Perform redirect (string) or reload (true) on success
|
|
38
|
+
*/
|
|
39
|
+
handleLogin(redirect: string): Promise<SessionData | null>;
|
|
40
|
+
handleLogin(reload?: boolean): Promise<SessionData | null>;
|
|
32
41
|
/**
|
|
33
42
|
* Check if origin is recognized & whitelisted
|
|
34
43
|
* @param {string} host Origin to check
|
|
@@ -58,8 +67,10 @@ export declare class Auth extends PathEventEmitter {
|
|
|
58
67
|
loginRedirect(host?: string): Promise<string>;
|
|
59
68
|
/**
|
|
60
69
|
* Logout current user
|
|
70
|
+
* @param {boolean | string} reload - Perform redirect (string) or reload (true) on logout
|
|
61
71
|
*/
|
|
62
|
-
logout(): Promise<void>;
|
|
72
|
+
logout(redirect: string): Promise<void>;
|
|
73
|
+
logout(reload?: boolean): Promise<void>;
|
|
63
74
|
/**
|
|
64
75
|
* Create a new user with login
|
|
65
76
|
* @param {Partial<User> & {password: string}} user User data with password
|
package/dist/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,gBAAgB,EAAM,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,IAAI,EAAE,WAAW,EAAC,MAAM,QAAQ,CAAC;AACzC,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,SAAS,CAAC;AAElC,MAAM,MAAM,WAAW,GAAG;IACzB,iBAAiB;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,mBAAmB;IACnB,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,6BAA6B;IAC7B,MAAM,EAAE,GAAG,CAAC;IACZ,wBAAwB;IACxB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,oCAAoC;IACpC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,2BAA2B;IAC3B,WAAW,EAAE,MAAM,EAAE,CAAA;CACrB,CAAA;AAED,iCAAiC;AACjC,qBAAa,IAAK,SAA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