@lifeaz/gate-helper 1.0.3 → 1.0.5
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 +2 -2
- package/dist/main.d.ts +3 -2
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +1 -2
- package/package.json +20 -8
- package/src/main.ts +8 -8
- package/.editorconfig +0 -14
- package/.gitlab-ci.yml +0 -42
- package/CODEOWNERS +0 -5
- package/STYLE.md +0 -72
- package/VERSION +0 -1
- package/tsconfig.json +0 -37
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# 🔐 GATE Helper
|
|
2
|
-
**1.0.
|
|
2
|
+
**1.0.5** Global Authentication and Trust Endpoint Helper
|
|
3
3
|
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -10,6 +10,6 @@ Easier implementation of Lifeaz GATE authentication for everyone.
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
### 🪴EOD
|
|
13
|
-
> ***
|
|
13
|
+
> ***1.0.5**
|
|
14
14
|
This repository is PROPRIETARY. No part of this repository
|
|
15
15
|
may be disclosed in any manner without the prior written consent of Lifeaz. https://lifeaz.co*
|
package/dist/main.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Dayjs } from "dayjs";
|
|
2
2
|
import { UUID } from "uuidv7";
|
|
3
3
|
export type Permission = string;
|
|
4
4
|
export interface User {
|
|
@@ -9,7 +9,7 @@ export interface User {
|
|
|
9
9
|
lastname: string;
|
|
10
10
|
gender: Gender;
|
|
11
11
|
role: Role;
|
|
12
|
-
birthdate:
|
|
12
|
+
birthdate: Dayjs | null;
|
|
13
13
|
phone: Phone | null;
|
|
14
14
|
address: Address | null;
|
|
15
15
|
a2f: A2F | null;
|
|
@@ -65,3 +65,4 @@ export interface State {
|
|
|
65
65
|
name: string;
|
|
66
66
|
iso: string;
|
|
67
67
|
}
|
|
68
|
+
//# sour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E,EAAE,IAAI,CAAC;IACT,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,OAAO;IACvB,EAAE,EAAE,IAAI,CAAC;IACT,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,OAAO;IACvB,EAAE,EAAE,IAAI,CAAC;IACT,IAAI,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,KAAK;IACrB,EAAE,EAAE,IAAI,CAAC;IACT,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACZ"}
|
package/dist/main.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
import { UUID } from "uuidv7";
|
package/package.json
CHANGED
|
@@ -1,15 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lifeaz/gate-helper",
|
|
3
3
|
"description": "Lifeaz Global Authentication and Trust Endpoint Helper",
|
|
4
|
-
|
|
4
|
+
"version": "1.0.5",
|
|
5
|
+
"versionCode": "100050029",
|
|
5
6
|
"main": "dist/main.js",
|
|
6
|
-
|
|
7
|
+
"files": ["dist", "src/main.ts"],
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/main.d.ts",
|
|
11
|
+
"bun": "./src/main.ts",
|
|
12
|
+
"import": "./dist/main.js",
|
|
13
|
+
"require": "./dist/main.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"type": "module",
|
|
17
|
+
"types": "dist/main.d.ts",
|
|
7
18
|
"engines": {
|
|
8
19
|
"node": ">=20"
|
|
9
20
|
},
|
|
10
21
|
"cpu": [
|
|
11
22
|
"x86",
|
|
12
|
-
"x64"
|
|
23
|
+
"x64",
|
|
24
|
+
"arm64"
|
|
13
25
|
],
|
|
14
26
|
"keywords": [
|
|
15
27
|
"lifeaz",
|
|
@@ -19,12 +31,12 @@
|
|
|
19
31
|
],
|
|
20
32
|
"scripts": {
|
|
21
33
|
"build": "npm run clean && tsc",
|
|
22
|
-
"
|
|
34
|
+
"build:version": "bash bump.sh",
|
|
35
|
+
"clean": "rimraf dist",
|
|
36
|
+
"debug": "npm run build && node dist/test.js"
|
|
23
37
|
},
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"moment": "^2.30.1",
|
|
27
|
-
"tslib": "^2.8.0",
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"dayjs": "^1.11.20",
|
|
28
40
|
"uuidv7": "^1.0.2"
|
|
29
41
|
},
|
|
30
42
|
"devDependencies": {
|
package/src/main.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Dayjs } from "dayjs";
|
|
2
2
|
import { UUID } from "uuidv7";
|
|
3
3
|
|
|
4
4
|
export type Permission = string;
|
|
@@ -11,10 +11,10 @@ export interface User {
|
|
|
11
11
|
lastname: string;
|
|
12
12
|
gender: Gender;
|
|
13
13
|
role: Role;
|
|
14
|
-
birthdate:
|
|
15
|
-
phone: Phone|null;
|
|
16
|
-
address: Address|null;
|
|
17
|
-
a2f: A2F|null;
|
|
14
|
+
birthdate: Dayjs | null;
|
|
15
|
+
phone: Phone | null;
|
|
16
|
+
address: Address | null;
|
|
17
|
+
a2f: A2F | null;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export interface Gender {
|
|
@@ -48,8 +48,8 @@ export interface Phone {
|
|
|
48
48
|
export interface Address {
|
|
49
49
|
id: UUID;
|
|
50
50
|
country: Country;
|
|
51
|
-
state: State|null;
|
|
52
|
-
alias: string|null;
|
|
51
|
+
state: State | null;
|
|
52
|
+
alias: string | null;
|
|
53
53
|
line: string;
|
|
54
54
|
details: string;
|
|
55
55
|
postcode: string;
|
|
@@ -72,7 +72,7 @@ export interface Geozone {
|
|
|
72
72
|
|
|
73
73
|
export interface State {
|
|
74
74
|
id: UUID;
|
|
75
|
-
country?: Country|null;
|
|
75
|
+
country?: Country | null;
|
|
76
76
|
name: string;
|
|
77
77
|
iso: string;
|
|
78
78
|
}
|
package/.editorconfig
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
root = true
|
|
2
|
-
|
|
3
|
-
[*]
|
|
4
|
-
end_of_line = lf
|
|
5
|
-
charset = utf-8
|
|
6
|
-
indent_style = tab
|
|
7
|
-
indent_size = 4
|
|
8
|
-
insert_final_newline = true
|
|
9
|
-
trim_trailing_whitespace = true
|
|
10
|
-
|
|
11
|
-
[*.md]
|
|
12
|
-
max_line_length = off
|
|
13
|
-
insert_final_newline = false
|
|
14
|
-
trim_trailing_whitespace = false
|
package/.gitlab-ci.yml
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
include:
|
|
2
|
-
- project: 'everydayheroes-team/cloud/internal/templates/ci'
|
|
3
|
-
file: '.gitlab-ci.yml'
|
|
4
|
-
|
|
5
|
-
stages:
|
|
6
|
-
- pre
|
|
7
|
-
- build
|
|
8
|
-
- quality
|
|
9
|
-
- documentation
|
|
10
|
-
- release
|
|
11
|
-
- deploy
|
|
12
|
-
|
|
13
|
-
build:
|
|
14
|
-
stage: build
|
|
15
|
-
image: node:lts-alpine
|
|
16
|
-
script:
|
|
17
|
-
- npm ci
|
|
18
|
-
- npm run build
|
|
19
|
-
artifacts:
|
|
20
|
-
paths:
|
|
21
|
-
- dist/
|
|
22
|
-
|
|
23
|
-
publish:
|
|
24
|
-
stage: release
|
|
25
|
-
image: node:lts-alpine
|
|
26
|
-
only:
|
|
27
|
-
- tags
|
|
28
|
-
before_script:
|
|
29
|
-
- npm install
|
|
30
|
-
script:
|
|
31
|
-
- echo "//registry.npmjs.org/:_authToken=\${NPM_LIFEAZ_PUBLISH_TOKEN}" >> ~/.npmrc
|
|
32
|
-
- npm publish --access=public
|
|
33
|
-
|
|
34
|
-
unpublish:
|
|
35
|
-
stage: release
|
|
36
|
-
image: node:lts-alpine
|
|
37
|
-
only:
|
|
38
|
-
- tags
|
|
39
|
-
script:
|
|
40
|
-
- echo "//registry.npmjs.org/:_authToken=\${NPM_LIFEAZ_PUBLISH_TOKEN}" >> ~/.npmrc
|
|
41
|
-
- npm unpublish
|
|
42
|
-
when: manual
|
package/CODEOWNERS
DELETED
package/STYLE.md
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
# Introduction
|
|
2
|
-
|
|
3
|
-
This file describes the various style and design conventions that are used in the Kent dashboard repository.
|
|
4
|
-
|
|
5
|
-
# TypeScript Coding Conventions
|
|
6
|
-
|
|
7
|
-
Our TypeScript style is inspired by the [style guidelines](https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines) of the TypeScript implementation itself.
|
|
8
|
-
|
|
9
|
-
## Naming
|
|
10
|
-
|
|
11
|
-
1. Use PascalCase for type names.
|
|
12
|
-
1. Do not use `I` as a prefix for interface names.
|
|
13
|
-
1. Use PascalCase for `enum` values.
|
|
14
|
-
1. Use `camelCase` for function names.
|
|
15
|
-
1. Use `camelCase` for property names and local variables.
|
|
16
|
-
1. Use `_` as a prefix for private properties.
|
|
17
|
-
1. Use whole words in names when possible.
|
|
18
|
-
1. Give type parameters names prefixed with `T`, for example `Request<TBody>`.
|
|
19
|
-
|
|
20
|
-
## Syntax and Types
|
|
21
|
-
|
|
22
|
-
1. Use `undefined`. Do not use `null`.
|
|
23
|
-
1. Prefer `for..of` over `.forEach`.
|
|
24
|
-
1. Do not introduce new types/values to the global namespace.
|
|
25
|
-
|
|
26
|
-
## File and Export Structure
|
|
27
|
-
|
|
28
|
-
1. Keep `main.ts` free from implementation, it should only contain re-exports.
|
|
29
|
-
1. If a file has a single or a main export, name the file after the export.
|
|
30
|
-
|
|
31
|
-
# Documentation Guidelines
|
|
32
|
-
|
|
33
|
-
We use [API Extractor](https://api-extractor.com/pages/overview/demo_docs/) to generate our documentation, which in turn uses [TSDoc](https://github.com/microsoft/tsdoc) to parse our doc comments.
|
|
34
|
-
|
|
35
|
-
The doc comments are of the good old `/** ... */` format, with tags of the format `@<tag>` used to mark various things. The [TSDoc website](https://tsdoc.org/) has a good index of all available tags.
|
|
36
|
-
|
|
37
|
-
There are a few things to pay attention to, in order to make the documentation show up in a nice way on the website...
|
|
38
|
-
|
|
39
|
-
## Use `@remarks` to split long descriptions
|
|
40
|
-
|
|
41
|
-
The API reference has an index of exported symbols for each package, which uses a short description, while clicking through to the page for a symbol shows the full description. By default all descriptions are considered "short", and you have to manually add a divider where the description should be cut off using the `@remarks` tag.
|
|
42
|
-
|
|
43
|
-
```ts
|
|
44
|
-
/**
|
|
45
|
-
* This function helps you create a thing.
|
|
46
|
-
*
|
|
47
|
-
* @remarks
|
|
48
|
-
*
|
|
49
|
-
* Here is a much longer and more elaborate description of how the
|
|
50
|
-
* creation of a thing works, which is way too long to fit on the index page.
|
|
51
|
-
*/
|
|
52
|
-
function createTheThing() {}
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## Use `@param` to document parameters
|
|
56
|
-
|
|
57
|
-
When using the `@param` tag to document a parameter it will show up in the **Parameters** section:
|
|
58
|
-
|
|
59
|
-

|
|
60
|
-
|
|
61
|
-
Be sure to include a `-` after the parameter name as well as [required by TSDoc](https://tsdoc.org/pages/tags/param/), or you'll get a warning in the API report.
|
|
62
|
-
|
|
63
|
-
```ts
|
|
64
|
-
/**
|
|
65
|
-
* Generates a PluginCacheManager for consumption by plugins.
|
|
66
|
-
*
|
|
67
|
-
* @param pluginId - The plugin that the cache manager should be created for. Plugin names should be unique.
|
|
68
|
-
*/
|
|
69
|
-
forPlugin(pluginId: string): PluginCacheManager {
|
|
70
|
-
...
|
|
71
|
-
}
|
|
72
|
-
```
|
package/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1.0.3
|
package/tsconfig.json
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"module": "NodeNext",
|
|
5
|
-
"rootDir": "src/",
|
|
6
|
-
"outDir": "dist/",
|
|
7
|
-
"strict": true,
|
|
8
|
-
"moduleResolution": "NodeNext",
|
|
9
|
-
"importHelpers": true,
|
|
10
|
-
"experimentalDecorators": true,
|
|
11
|
-
"esModuleInterop": true,
|
|
12
|
-
"skipLibCheck": true,
|
|
13
|
-
"allowSyntheticDefaultImports": true,
|
|
14
|
-
"resolveJsonModule": true,
|
|
15
|
-
"forceConsistentCasingInFileNames": true,
|
|
16
|
-
"removeComments": true,
|
|
17
|
-
"typeRoots": [
|
|
18
|
-
"node_modules/@types"
|
|
19
|
-
],
|
|
20
|
-
"sourceMap": false,
|
|
21
|
-
"baseUrl": "./",
|
|
22
|
-
"declaration": true
|
|
23
|
-
},
|
|
24
|
-
"include": [
|
|
25
|
-
"src/**/*.ts"
|
|
26
|
-
],
|
|
27
|
-
"exclude": [
|
|
28
|
-
"node_modules",
|
|
29
|
-
"dist",
|
|
30
|
-
".vscode",
|
|
31
|
-
".git",
|
|
32
|
-
".env",
|
|
33
|
-
"__tests__",
|
|
34
|
-
"jest.config.js",
|
|
35
|
-
"coverage"
|
|
36
|
-
],
|
|
37
|
-
}
|