@veloxts/auth 0.2.0 → 0.3.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.
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @veloxts/auth - Authentication and authorization system
3
+ *
4
+ * Provides authentication middleware, session management, and authorization
5
+ * guards for VeloxTS applications. Deferred to v1.1+ release.
6
+ *
7
+ * @note This package is a placeholder for MVP (v0.1.0)
8
+ */
9
+ export declare const AUTH_VERSION = "0.1.0";
10
+ /**
11
+ * User interface for authenticated requests
12
+ */
13
+ export interface User {
14
+ id: string;
15
+ email: string;
16
+ [key: string]: unknown;
17
+ }
18
+ /**
19
+ * Creates an authentication plugin for VeloxTS
20
+ *
21
+ * @param config - Authentication configuration
22
+ * @returns Auth plugin
23
+ *
24
+ * @note Full implementation coming in v1.1+
25
+ */
26
+ export declare function createAuth(_config?: {
27
+ secret?: string;
28
+ sessionStore?: unknown;
29
+ }): {
30
+ version: string;
31
+ middleware: () => void;
32
+ };
33
+ /**
34
+ * Authorization guard decorator (placeholder)
35
+ *
36
+ * @note Full implementation coming in v1.1+
37
+ */
38
+ export declare function guard(permissions: string[]): (target: unknown) => unknown;
39
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,YAAY,UAAU,CAAC;AAEpC;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAA;CAAO;;;EAOnF;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,WAAW,EAAE,MAAM,EAAE,IACjC,QAAQ,OAAO,aAIxB"}
package/dist/index.js ADDED
@@ -0,0 +1,37 @@
1
+ /**
2
+ * @veloxts/auth - Authentication and authorization system
3
+ *
4
+ * Provides authentication middleware, session management, and authorization
5
+ * guards for VeloxTS applications. Deferred to v1.1+ release.
6
+ *
7
+ * @note This package is a placeholder for MVP (v0.1.0)
8
+ */
9
+ export const AUTH_VERSION = '0.1.0';
10
+ /**
11
+ * Creates an authentication plugin for VeloxTS
12
+ *
13
+ * @param config - Authentication configuration
14
+ * @returns Auth plugin
15
+ *
16
+ * @note Full implementation coming in v1.1+
17
+ */
18
+ export function createAuth(_config = {}) {
19
+ return {
20
+ version: AUTH_VERSION,
21
+ middleware: () => {
22
+ console.log('Auth middleware placeholder (v1.1+)');
23
+ },
24
+ };
25
+ }
26
+ /**
27
+ * Authorization guard decorator (placeholder)
28
+ *
29
+ * @note Full implementation coming in v1.1+
30
+ */
31
+ export function guard(permissions) {
32
+ return (target) => {
33
+ console.log(`Guard decorator placeholder: ${permissions.join(', ')}`);
34
+ return target;
35
+ };
36
+ }
37
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO,CAAC;AAWpC;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU,CAAC,UAAuD,EAAE;IAClF,OAAO;QACL,OAAO,EAAE,YAAY;QACrB,UAAU,EAAE,GAAG,EAAE;YACf,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;QACrD,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,KAAK,CAAC,WAAqB;IACzC,OAAO,CAAC,MAAe,EAAE,EAAE;QACzB,OAAO,CAAC,GAAG,CAAC,gCAAgC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACtE,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veloxts/auth",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Authentication and authorization system for VeloxTS framework (v1.1+)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -16,9 +16,9 @@
16
16
  "README.md"
17
17
  ],
18
18
  "dependencies": {
19
- "@veloxts/core": "0.2.0",
20
- "@veloxts/router": "0.2.0",
21
- "@veloxts/orm": "0.2.0"
19
+ "@veloxts/core": "0.3.0",
20
+ "@veloxts/router": "0.3.0",
21
+ "@veloxts/orm": "0.3.0"
22
22
  },
23
23
  "devDependencies": {
24
24
  "typescript": "5.9.3"