@pigeonposse/api-2026 0.0.0-stage → 1.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.
Files changed (44) hide show
  1. package/LICENSE +676 -0
  2. package/README.md +120 -2
  3. package/dist/api/openapi.d.ts +656 -0
  4. package/dist/api/openapi.json +1706 -0
  5. package/dist/bin.cjs +14 -0
  6. package/dist/bin.d.cts +1 -0
  7. package/dist/bin.d.mts +1 -0
  8. package/dist/bin.d.ts +1 -0
  9. package/dist/bin.mjs +12 -0
  10. package/dist/env.cjs +21 -0
  11. package/dist/env.d.cts +23 -0
  12. package/dist/env.d.mts +23 -0
  13. package/dist/env.d.ts +23 -0
  14. package/dist/env.mjs +19 -0
  15. package/dist/local.cjs +15 -0
  16. package/dist/local.d.cts +9 -0
  17. package/dist/local.d.mts +7 -0
  18. package/dist/local.d.ts +9 -0
  19. package/dist/local.mjs +6 -0
  20. package/dist/main.cjs +22 -0
  21. package/dist/main.d.cts +13 -0
  22. package/dist/main.d.mts +11 -0
  23. package/dist/main.d.ts +13 -0
  24. package/dist/main.mjs +14 -0
  25. package/dist/schema/banner.json +11 -0
  26. package/dist/schema/code-of-conduct.json +11 -0
  27. package/dist/schema/composer.json +13 -0
  28. package/dist/schema/config.json +192 -0
  29. package/dist/schema/contributting.json +11 -0
  30. package/dist/schema/logo.json +11 -0
  31. package/dist/schema/package.json +13 -0
  32. package/dist/schema/readme.json +4 -0
  33. package/dist/schema/security.json +11 -0
  34. package/dist/schema/support.json +11 -0
  35. package/dist/server.cjs +16 -0
  36. package/dist/server.d.cts +9 -0
  37. package/dist/server.d.mts +9 -0
  38. package/dist/server.d.ts +9 -0
  39. package/dist/server.mjs +9 -0
  40. package/dist/shared/api-2026.C367WW-0.cjs +34 -0
  41. package/dist/shared/api-2026.CDiWYIa6.mjs +25 -0
  42. package/dist/shared/api-2026.CrRWS0qQ.mjs +32 -0
  43. package/dist/shared/api-2026.DKKpCkQB.cjs +40 -0
  44. package/package.json +80 -3
@@ -0,0 +1,34 @@
1
+ 'use strict';
2
+
3
+ const createApp = require('@collectium/api/local');
4
+ const env = require('../env.cjs');
5
+ const core = require('@collectium/core');
6
+ const config = require('@pigeonposse/api-config-2026');
7
+ const node_util = require('node:util');
8
+
9
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
10
+
11
+ const createApp__default = /*#__PURE__*/_interopDefaultCompat(createApp);
12
+ const config__default = /*#__PURE__*/_interopDefaultCompat(config);
13
+
14
+ const collectium = new core.Collectium(config__default);
15
+
16
+ const bold = (v) => node_util.styleText("bold", v);
17
+ const desc = (v) => node_util.styleText("dim", v);
18
+ const warnOut = (v) => node_util.styleText("yellow", `${bold("\u26A0 IMPORTANT")} ${desc(v)}`);
19
+ const setNotifications = () => {
20
+ if (!env.ENV.GH_TOKEN)
21
+ console.warn(warnOut("Pass a Github token as an argument for the API to work fully\n"));
22
+ };
23
+
24
+ const appLocal = () => {
25
+ setNotifications();
26
+ return createApp__default({
27
+ collectium,
28
+ opts: { path: env.ENV.API_STORE_PATH }
29
+ });
30
+ };
31
+
32
+ exports.appLocal = appLocal;
33
+ exports.collectium = collectium;
34
+ exports.setNotifications = setNotifications;
@@ -0,0 +1,25 @@
1
+ import createApp from '@collectium/api/local';
2
+ import { ENV } from '../env.mjs';
3
+ import { Collectium } from '@collectium/core';
4
+ import config from '@pigeonposse/api-config-2026';
5
+ import { styleText } from 'node:util';
6
+
7
+ const collectium = new Collectium(config);
8
+
9
+ const bold = (v) => styleText("bold", v);
10
+ const desc = (v) => styleText("dim", v);
11
+ const warnOut = (v) => styleText("yellow", `${bold("\u26A0 IMPORTANT")} ${desc(v)}`);
12
+ const setNotifications = () => {
13
+ if (!ENV.GH_TOKEN)
14
+ console.warn(warnOut("Pass a Github token as an argument for the API to work fully\n"));
15
+ };
16
+
17
+ const appLocal = () => {
18
+ setNotifications();
19
+ return createApp({
20
+ collectium,
21
+ opts: { path: ENV.API_STORE_PATH }
22
+ });
23
+ };
24
+
25
+ export { appLocal as a, collectium as c, setNotifications as s };
@@ -0,0 +1,32 @@
1
+ import { server } from '@backan/server';
2
+ import { ENV } from '../env.mjs';
3
+ import { s as setNotifications, c as collectium, a as appLocal } from './api-2026.CDiWYIa6.mjs';
4
+ import createApp from '@collectium/api/standard';
5
+
6
+ const appStandard = () => {
7
+ setNotifications();
8
+ return createApp({ collectium });
9
+ };
10
+
11
+ const createServer = async (props) => {
12
+ if (props) Object.entries(props).forEach(([key, value]) => {
13
+ if (key in ENV) ENV[key] = value;
14
+ });
15
+ if (ENV.DEBUG === "true") console.log({ ENV });
16
+ await server({
17
+ app: appStandard(),
18
+ port: ENV.API_PORT
19
+ });
20
+ };
21
+ const createLocalServer = async (props) => {
22
+ if (props) Object.entries(props).forEach(([key, value]) => {
23
+ if (key in ENV) ENV[key] = value;
24
+ });
25
+ if (ENV.DEBUG === "true") console.log({ ENV });
26
+ await server({
27
+ app: appLocal(),
28
+ port: ENV.API_PORT
29
+ });
30
+ };
31
+
32
+ export { appStandard as a, createServer as b, createLocalServer as c };
@@ -0,0 +1,40 @@
1
+ 'use strict';
2
+
3
+ const server = require('@backan/server');
4
+ const env = require('../env.cjs');
5
+ const local = require('./api-2026.C367WW-0.cjs');
6
+ const createApp = require('@collectium/api/standard');
7
+
8
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
9
+
10
+ const createApp__default = /*#__PURE__*/_interopDefaultCompat(createApp);
11
+
12
+ const appStandard = () => {
13
+ local.setNotifications();
14
+ return createApp__default({ collectium: local.collectium });
15
+ };
16
+
17
+ const createServer = async (props) => {
18
+ if (props) Object.entries(props).forEach(([key, value]) => {
19
+ if (key in env.ENV) env.ENV[key] = value;
20
+ });
21
+ if (env.ENV.DEBUG === "true") console.log({ ENV: env.ENV });
22
+ await server.server({
23
+ app: appStandard(),
24
+ port: env.ENV.API_PORT
25
+ });
26
+ };
27
+ const createLocalServer = async (props) => {
28
+ if (props) Object.entries(props).forEach(([key, value]) => {
29
+ if (key in env.ENV) env.ENV[key] = value;
30
+ });
31
+ if (env.ENV.DEBUG === "true") console.log({ ENV: env.ENV });
32
+ await server.server({
33
+ app: local.appLocal(),
34
+ port: env.ENV.API_PORT
35
+ });
36
+ };
37
+
38
+ exports.appStandard = appStandard;
39
+ exports.createLocalServer = createLocalServer;
40
+ exports.createServer = createServer;
package/package.json CHANGED
@@ -1,6 +1,83 @@
1
1
  {
2
2
  "name": "@pigeonposse/api-2026",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "1.0.1",
4
+ "description": "API for PigeonPosse web 2026",
5
+ "keywords": [
6
+ "api",
7
+ "pigeonposse",
8
+ "pp"
9
+ ],
10
+ "repository": {
11
+ "type": "git",
12
+ "directory": "packages/api",
13
+ "url": "git+https://github.com/pigeonposse/pigeon-web.git"
14
+ },
15
+ "license": "GPL-3.0-only",
16
+ "type": "module",
17
+ "exports": {
18
+ ".": {
19
+ "import": {
20
+ "types": "./dist/main.d.ts",
21
+ "default": "./dist/main.mjs"
22
+ },
23
+ "require": {
24
+ "types": "./dist/main.d.cts",
25
+ "default": "./dist/main.cjs"
26
+ }
27
+ },
28
+ "./api/openapi.d.ts": "./dist/api/openapi.d.ts",
29
+ "./api/openapi.json": "./dist/api/openapi.json",
30
+ "./env": {
31
+ "types": "./dist/env.d.ts",
32
+ "import": "./dist/env.mjs",
33
+ "require": "./dist/env.cjs"
34
+ },
35
+ "./local": {
36
+ "types": "./dist/local.d.ts",
37
+ "import": "./dist/local.mjs",
38
+ "require": "./dist/local.cjs"
39
+ },
40
+ "./schema/*": "./dist/schema/*",
41
+ "./server": {
42
+ "types": "./dist/server.d.ts",
43
+ "import": "./dist/server.mjs",
44
+ "require": "./dist/server.cjs"
45
+ }
46
+ },
47
+ "main": "dist/main.mjs",
48
+ "types": "./dist/main.d.ts",
49
+ "bin": {
50
+ "pigeonposse-api": "./dist/bin.mjs",
51
+ "pigeonposse-api-2026": "./dist/bin.mjs"
52
+ },
53
+ "files": [
54
+ "dist"
55
+ ],
56
+ "author": {
57
+ "name": "Angelo",
58
+ "email": "angelo@pigeonposse.com",
59
+ "url": "https://github.com/angelespejo"
60
+ },
61
+ "dependencies": {
62
+ "@backan/server": "0.2.8",
63
+ "@collectium/api": "~0.3.10",
64
+ "@collectium/core": "~0.3.10",
65
+ "@pigeonposse/api-config-2026": "1.0.1"
66
+ },
67
+ "devDependencies": {
68
+ "@collectium/builder": "~0.3.10",
69
+ "@pigeonposse/repo-config": "1.0.1"
70
+ },
71
+ "publishConfig": {
72
+ "access": "public",
73
+ "registry": "https://registry.npmjs.org/"
74
+ },
75
+ "scripts": {
76
+ "build": "pnpm build:lib && pnpm build:schema",
77
+ "build:example": "pnpx tsx ./build.example.ts",
78
+ "build:lib": "unbuild",
79
+ "build:schema": "pnpx tsx build.schema.ts",
80
+ "dev": "pnpx tsx src/bin.ts",
81
+ "example": "node examples/local.ts"
82
+ }
6
83
  }