@gh-platform/auth-sdk 1.0.10 โ†’ 1.0.11

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/Makefile ADDED
@@ -0,0 +1,63 @@
1
+ SHELL := /usr/bin/env bash
2
+ .SHELLFLAGS := -euo pipefail -c
3
+
4
+ PACKAGE_JSON := package.json
5
+ VERSION := $(shell jq -r '.version' $(PACKAGE_JSON))
6
+ LATEST_TAG := $(shell git tag --sort=-v:refname | head -n 1)
7
+
8
+ define check_jq
9
+ @if ! command -v jq >/dev/null 2>&1; then \
10
+ echo "โŒ jq is not installed."; \
11
+ echo ""; \
12
+ echo "๐Ÿ‘‰ Install jq with:"; \
13
+ echo " macOS (Homebrew): brew install jq"; \
14
+ echo " Ubuntu/Debian: sudo apt install jq"; \
15
+ echo " Alpine Linux: apk add jq"; \
16
+ echo " Fedora/RHEL: sudo dnf install jq"; \
17
+ echo " Arch Linux: sudo pacman -S jq"; \
18
+ echo " Windows (Chocolatey): choco install jq"; \
19
+ echo " Windows (Scoop): scoop install jq"; \
20
+ exit 1; \
21
+ fi
22
+ endef
23
+
24
+ define bump_version
25
+ $(call check_jq)
26
+
27
+ @echo "๐Ÿ“ฆ Package: $$(jq -r '.name' $(PACKAGE_JSON))"
28
+ @echo "๐Ÿ”– Current version: $(VERSION)"
29
+
30
+ @if [[ -z "$(VERSION)" ]]; then \
31
+ echo "โŒ Cannot read version from package.json"; \
32
+ exit 1; \
33
+ fi
34
+
35
+ @PREFIX=$$(echo "$(LATEST_TAG)" | sed -n 's/^\(v\).*/\1/p'); \
36
+ NEW_VERSION=$$(echo "$(VERSION)" | awk -F. '{ \
37
+ major=$$1; minor=$$2; patch=$$3; \
38
+ if ("$(1)"=="patch") patch++; \
39
+ else if ("$(1)"=="minor") { minor++; patch=0; } \
40
+ else if ("$(1)"=="major") { major++; minor=0; patch=0; } \
41
+ printf "%d.%d.%d", major, minor, patch \
42
+ }'); \
43
+ NEW_TAG="$$PREFIX$$NEW_VERSION"; \
44
+ echo "๐Ÿš€ New version: $$NEW_VERSION"; \
45
+ echo "๐Ÿท New tag: $$NEW_TAG"; \
46
+ jq '.version="'"$$NEW_VERSION"'"' $(PACKAGE_JSON) > $(PACKAGE_JSON).tmp; \
47
+ mv $(PACKAGE_JSON).tmp $(PACKAGE_JSON); \
48
+ git add $(PACKAGE_JSON); \
49
+ git commit -m "chore(release): $$NEW_VERSION"; \
50
+ git tag $$NEW_TAG; \
51
+ git push origin main --tags
52
+ endef
53
+
54
+
55
+ # -------- Commands --------
56
+ bump-patch:
57
+ $(call bump_version,patch)
58
+
59
+ bump-minor:
60
+ $(call bump_version,minor)
61
+
62
+ bump-major:
63
+ $(call bump_version,major)
package/dist/index.d.ts CHANGED
@@ -79,7 +79,7 @@ export class AuthClient {
79
79
  }
80
80
 
81
81
  export class AuthFetch {
82
- constructor(authClient: AuthClient, introspectBaseUrl: string, storage?: TokenStorage, introspectPath?: string = "introspect");
82
+ constructor(authClient: AuthClient, introspectBaseUrl: string, storage?: TokenStorage, introspectPath?: string);
83
83
 
84
84
  /**
85
85
  * fetch wrapper โ€” hแป— trแปฃ:
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
- "name": "@gh-platform/auth-sdk",
3
- "version": "1.0.10",
4
- "description": "VanillaJS Auth SDK for GH Platform",
5
- "type": "module",
6
- "main": "dist/auth-sdk.umd.js",
7
- "module": "dist/auth-sdk.es.js",
8
- "types": "dist/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "types": "./dist/index.d.ts",
12
- "import": "./dist/auth-sdk.es.js",
13
- "require": "./dist/auth-sdk.umd.js"
14
- }
15
- },
16
- "scripts": {
17
- "build": "vite build && cp src/index.d.ts dist/index.d.ts && terser dist/auth-sdk.umd.js -o dist/auth-sdk.min.js --compress --mangle"
18
- },
19
- "devDependencies": {
20
- "vite": "^5.0.0",
21
- "terser": "^5.20.0"
2
+ "name": "@gh-platform/auth-sdk",
3
+ "version": "1.0.11",
4
+ "description": "VanillaJS Auth SDK for GH Platform",
5
+ "type": "module",
6
+ "main": "dist/auth-sdk.umd.js",
7
+ "module": "dist/auth-sdk.es.js",
8
+ "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/auth-sdk.es.js",
13
+ "require": "./dist/auth-sdk.umd.js"
22
14
  }
23
- }
15
+ },
16
+ "scripts": {
17
+ "build": "vite build && cp src/index.d.ts dist/index.d.ts && terser dist/auth-sdk.umd.js -o dist/auth-sdk.min.js --compress --mangle"
18
+ },
19
+ "devDependencies": {
20
+ "vite": "^5.0.0",
21
+ "terser": "^5.20.0"
22
+ }
23
+ }
package/src/index.d.ts CHANGED
@@ -79,7 +79,7 @@ export class AuthClient {
79
79
  }
80
80
 
81
81
  export class AuthFetch {
82
- constructor(authClient: AuthClient, introspectBaseUrl: string, storage?: TokenStorage, introspectPath?: string = "introspect");
82
+ constructor(authClient: AuthClient, introspectBaseUrl: string, storage?: TokenStorage, introspectPath?: string);
83
83
 
84
84
  /**
85
85
  * fetch wrapper โ€” hแป— trแปฃ: