@flytedesk/app-kit 0.0.1

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 ADDED
@@ -0,0 +1,29 @@
1
+ # @flytedesk/app-kit
2
+
3
+ Shared platform package for every flytedesk app — the Node/TypeScript equivalent of
4
+ what `danx` is for the PHP apps.
5
+
6
+ Two subpath modules, one npm package:
7
+
8
+ - `@flytedesk/app-kit/auth` — the flytedesk-id BFF/OIDC client (PKCE, session issuance,
9
+ live per-request authorization).
10
+ - `@flytedesk/app-kit/trace` — a Postgres-native trace/audit layer (HTTP request → job →
11
+ DB write → logs, one queryable trace), buffered through Pub/Sub, with a scheduled
12
+ retention/prune job.
13
+
14
+ Status: **bootstrapping.** Both modules are placeholders. See media-planner's published
15
+ "Media Planner Backend" architecture doc for the full design (DEC-25 through DEC-34) and
16
+ the "app-kit hello world" acceptance gate this repo needs to clear before media-planner's
17
+ own domain work resumes.
18
+
19
+ ## Install
20
+
21
+ ```
22
+ pnpm add @flytedesk/app-kit
23
+ ```
24
+
25
+ ## Publishing
26
+
27
+ Published to the public npm registry under the `@flytedesk` org, access `restricted`.
28
+ Auth is a token in `~/.npmrc` (`//registry.npmjs.org/:_authToken=...`) — no CI publish
29
+ workflow yet; that's still open (see the artifact's Needs Attention tab).
@@ -0,0 +1,7 @@
1
+ /**
2
+ * flytedesk-id BFF/OIDC client — placeholder for the real module (DEC-27).
3
+ * Extraction target: media-planner's apps/api/src/{routes/auth.ts,lib/flytedeskId.ts,
4
+ * plugins/auth.ts}, generalized so `clientId`/`issuer`/redirect URI are config, not
5
+ * hardcoded to one app.
6
+ */
7
+ export declare const APP_KIT_AUTH_PLACEHOLDER = true;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * flytedesk-id BFF/OIDC client — placeholder for the real module (DEC-27).
3
+ * Extraction target: media-planner's apps/api/src/{routes/auth.ts,lib/flytedeskId.ts,
4
+ * plugins/auth.ts}, generalized so `clientId`/`issuer`/redirect URI are config, not
5
+ * hardcoded to one app.
6
+ */
7
+ export const APP_KIT_AUTH_PLACEHOLDER = true;
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Postgres-native trace/audit layer — placeholder for the real module (DEC-16, DEC-22,
3
+ * DEC-26, DEC-31). Ships Prisma schema fragments + SQL migrations + a `trace:sync` CLI,
4
+ * not a generated Prisma Client — see DEC-31 for why.
5
+ */
6
+ export declare const APP_KIT_TRACE_PLACEHOLDER = true;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Postgres-native trace/audit layer — placeholder for the real module (DEC-16, DEC-22,
3
+ * DEC-26, DEC-31). Ships Prisma schema fragments + SQL migrations + a `trace:sync` CLI,
4
+ * not a generated Prisma Client — see DEC-31 for why.
5
+ */
6
+ export const APP_KIT_TRACE_PLACEHOLDER = true;
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/trace/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC"}
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "@flytedesk/app-kit",
3
+ "version": "0.0.1",
4
+ "description": "Shared platform kit for flytedesk apps: flytedesk-id auth (BFF/OIDC client) and a Postgres-native trace/audit layer.",
5
+ "type": "module",
6
+ "license": "UNLICENSED",
7
+ "private": false,
8
+ "author": "flytedesk",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/Flytedesk/app-kit.git"
12
+ },
13
+ "homepage": "https://github.com/Flytedesk/app-kit#readme",
14
+ "bugs": {
15
+ "url": "https://github.com/Flytedesk/app-kit/issues"
16
+ },
17
+ "engines": {
18
+ "node": ">=24.0.0",
19
+ "pnpm": ">=12.0.0"
20
+ },
21
+ "publishConfig": {
22
+ "access": "restricted",
23
+ "registry": "https://registry.npmjs.org/"
24
+ },
25
+ "files": [
26
+ "dist"
27
+ ],
28
+ "exports": {
29
+ "./auth": {
30
+ "types": "./dist/auth/index.d.ts",
31
+ "import": "./dist/auth/index.js"
32
+ },
33
+ "./trace": {
34
+ "types": "./dist/trace/index.d.ts",
35
+ "import": "./dist/trace/index.js"
36
+ }
37
+ },
38
+ "scripts": {
39
+ "build": "tsc -p tsconfig.json",
40
+ "typecheck": "tsc -p tsconfig.json --noEmit",
41
+ "prepublishOnly": "npm run build"
42
+ },
43
+ "peerDependencies": {
44
+ "fastify": "^4 || ^5",
45
+ "@prisma/client": "^7"
46
+ },
47
+ "peerDependenciesMeta": {
48
+ "@prisma/client": {
49
+ "optional": true
50
+ }
51
+ },
52
+ "devDependencies": {
53
+ "@prisma/client": "^7.10.0",
54
+ "@types/node": "^24.0.0",
55
+ "fastify": "^5.12.0",
56
+ "typescript": "^5.7.0"
57
+ }
58
+ }