@lagunacreek/hogan-pms-client 0.1.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/README.md +44 -0
- package/dist/index.cjs +38 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/package.json +36 -0
package/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# @lagunacreek/hogan-pms-client
|
|
2
|
+
|
|
3
|
+
Shared client for the Hogan PMS API. Holds the connection logic and typed
|
|
4
|
+
data-access methods so they can be reused across apps instead of being
|
|
5
|
+
re-implemented per service.
|
|
6
|
+
|
|
7
|
+
## Status
|
|
8
|
+
|
|
9
|
+
Early scaffold. The only thing implemented so far is `version()`.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { version, VERSION } from "@lagunacreek/hogan-pms-client";
|
|
15
|
+
|
|
16
|
+
console.log(version()); // -> "0.1.0"
|
|
17
|
+
console.log(VERSION); // -> "0.1.0"
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Development
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install
|
|
24
|
+
npm run build # bundle to dist/ (ESM + CJS + d.ts) via tsup
|
|
25
|
+
npm test # run vitest
|
|
26
|
+
npm run typecheck # tsc --noEmit
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Layout
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
src/
|
|
33
|
+
index.ts # barrel export
|
|
34
|
+
version.ts # version() — package version
|
|
35
|
+
client.ts # (planned) HoganClient: fetch wrapper, retry/timeout
|
|
36
|
+
auth.ts # (planned) TokenProvider interface
|
|
37
|
+
errors.ts # (planned) HoganApiError, HoganValidationError, ...
|
|
38
|
+
types/ # (planned) types per resource
|
|
39
|
+
resources/ # (planned) one file per endpoint group
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The package version is injected at build time by tsup's `define` (and mirrored
|
|
43
|
+
in `vitest.config.ts` for tests), sourced from `package.json`, so there is no
|
|
44
|
+
JSON import assertion at runtime.
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
VERSION: () => VERSION,
|
|
24
|
+
version: () => version
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(index_exports);
|
|
27
|
+
|
|
28
|
+
// src/version.ts
|
|
29
|
+
var VERSION = true ? "0.1.0" : "0.0.0";
|
|
30
|
+
function version() {
|
|
31
|
+
return VERSION;
|
|
32
|
+
}
|
|
33
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
34
|
+
0 && (module.exports = {
|
|
35
|
+
VERSION,
|
|
36
|
+
version
|
|
37
|
+
});
|
|
38
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/version.ts"],"sourcesContent":["// Barrel export for @lagunacreek/hogan-pms-client.\n//\n// As resources, the HoganClient, auth providers and error types are added,\n// re-export them from here so consumers have a single import surface.\nexport { version, VERSION } from \"./version.js\";\n","// `__PACKAGE_VERSION__` is replaced at build time by tsup's `define` (see\n// tsup.config.ts) and by vitest's `define` during tests, both sourced from\n// package.json. The fallback keeps the value sane if the package is consumed\n// in an unexpected way where the replacement did not happen.\ndeclare const __PACKAGE_VERSION__: string | undefined;\n\n/**\n * The version of this package, as declared in its package.json.\n */\nexport const VERSION: string =\n typeof __PACKAGE_VERSION__ === \"string\" ? __PACKAGE_VERSION__ : \"0.0.0\";\n\n/**\n * Returns the version of the hogan-pms-client package.\n */\nexport function version(): string {\n return VERSION;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACSO,IAAM,UACX,OAA0C,UAAsB;AAK3D,SAAS,UAAkB;AAChC,SAAO;AACT;","names":[]}
|
package/dist/index.d.cts
ADDED
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/version.ts"],"sourcesContent":["// `__PACKAGE_VERSION__` is replaced at build time by tsup's `define` (see\n// tsup.config.ts) and by vitest's `define` during tests, both sourced from\n// package.json. The fallback keeps the value sane if the package is consumed\n// in an unexpected way where the replacement did not happen.\ndeclare const __PACKAGE_VERSION__: string | undefined;\n\n/**\n * The version of this package, as declared in its package.json.\n */\nexport const VERSION: string =\n typeof __PACKAGE_VERSION__ === \"string\" ? __PACKAGE_VERSION__ : \"0.0.0\";\n\n/**\n * Returns the version of the hogan-pms-client package.\n */\nexport function version(): string {\n return VERSION;\n}\n"],"mappings":";AASO,IAAM,UACX,OAA0C,UAAsB;AAK3D,SAAS,UAAkB;AAChC,SAAO;AACT;","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@lagunacreek/hogan-pms-client",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Shared client for the Hogan PMS API: connection logic and typed data-access methods.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"require": "./dist/index.cjs"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsup",
|
|
21
|
+
"dev": "tsup --watch",
|
|
22
|
+
"typecheck": "tsc --noEmit",
|
|
23
|
+
"test": "vitest run",
|
|
24
|
+
"test:watch": "vitest",
|
|
25
|
+
"prepublishOnly": "npm run build && npm test"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@types/node": "^22.19.19",
|
|
29
|
+
"tsup": "^8.3.5",
|
|
30
|
+
"typescript": "^5.7.2",
|
|
31
|
+
"vitest": "^2.1.8"
|
|
32
|
+
},
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
}
|
|
36
|
+
}
|