@productcraft/core 0.0.1 → 0.0.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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +25 -0
  3. package/package.json +7 -6
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ProductCraft
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,25 @@
1
+ # @productcraft/core
2
+
3
+ Shared transport + auth primitives for the ProductCraft Node.js SDKs.
4
+
5
+ You **don't install this directly**. It's a runtime dependency of every product SDK (`@productcraft/heimdall`, `@productcraft/envoi`, `@productcraft/rally`, `@productcraft/agora`, `@productcraft/platform-auth`) plus the `productcraft` umbrella. Installing one of those pulls `@productcraft/core` along automatically.
6
+
7
+ ## What it provides
8
+
9
+ - `PCAuth` — discriminated union covering the three credential shapes the SDKs accept:
10
+ ```ts
11
+ | { type: "apiKey"; key: string } // pcft_live_*
12
+ | { type: "bearer"; token: string } // pre-resolved JWT
13
+ | { type: "cookie"; value: string } // captured auth_token
14
+ ```
15
+ - `PCClientConfig` — `{ auth?, baseUrl?, fetch? }`, the input shape every surface constructor takes.
16
+ - `PC_BASE_URL` — the per-surface prod base URLs, used as defaults.
17
+ - `makeClient<paths>(baseUrl, config)` — internal helper that wires an `openapi-fetch` client with the auth-header middleware.
18
+
19
+ ## When you'd touch it directly
20
+
21
+ Only if you're writing a new ProductCraft SDK surface package. Authoring custom backend integrations against ProductCraft APIs is what the per-product packages are for — start with one of those.
22
+
23
+ ## License
24
+
25
+ [MIT](https://github.com/clauderanelagh/productcraft-node/blob/main/LICENSE).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@productcraft/core",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "Shared transport, auth, and config primitives for the ProductCraft SDKs. Depended on by every per-surface package.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -21,9 +21,6 @@
21
21
  "engines": {
22
22
  "node": ">=18"
23
23
  },
24
- "scripts": {
25
- "build": "tsup"
26
- },
27
24
  "keywords": [
28
25
  "productcraft",
29
26
  "sdk"
@@ -37,9 +34,13 @@
37
34
  },
38
35
  "homepage": "https://github.com/clauderanelagh/productcraft-node/tree/main/packages/core",
39
36
  "publishConfig": {
40
- "access": "public"
37
+ "access": "public",
38
+ "provenance": true
41
39
  },
42
40
  "dependencies": {
43
41
  "openapi-fetch": "^0.13.0"
42
+ },
43
+ "scripts": {
44
+ "build": "tsup"
44
45
  }
45
- }
46
+ }