expediate 1.0.4 → 1.0.5

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 (52) hide show
  1. package/LICENSE +16 -16
  2. package/README.md +417 -30
  3. package/dist/apis.d.ts +138 -21
  4. package/dist/apis.d.ts.map +1 -1
  5. package/dist/apis.js +172 -79
  6. package/dist/apis.js.map +1 -1
  7. package/dist/cjs/apis.js +327 -0
  8. package/dist/cjs/git.js +293 -0
  9. package/dist/cjs/index.js +2583 -0
  10. package/dist/cjs/jwt-auth.js +532 -0
  11. package/dist/cjs/middleware.js +511 -0
  12. package/dist/cjs/mimetypes.json +1 -0
  13. package/dist/cjs/misc.js +787 -0
  14. package/dist/cjs/openapi.js +485 -0
  15. package/dist/cjs/package.json +1 -0
  16. package/dist/cjs/router.js +898 -0
  17. package/dist/cjs/static.js +669 -0
  18. package/dist/git.d.ts +71 -8
  19. package/dist/git.d.ts.map +1 -1
  20. package/dist/git.js +127 -72
  21. package/dist/git.js.map +1 -1
  22. package/dist/index.d.ts +17 -13
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +14 -24
  25. package/dist/index.js.map +1 -1
  26. package/dist/jwt-auth.d.ts +147 -57
  27. package/dist/jwt-auth.d.ts.map +1 -1
  28. package/dist/jwt-auth.js +445 -205
  29. package/dist/jwt-auth.js.map +1 -1
  30. package/dist/middleware.d.ts +476 -0
  31. package/dist/middleware.d.ts.map +1 -0
  32. package/dist/middleware.js +647 -0
  33. package/dist/middleware.js.map +1 -0
  34. package/dist/mimetypes.json +1 -1
  35. package/dist/misc.d.ts +112 -5
  36. package/dist/misc.d.ts.map +1 -1
  37. package/dist/misc.js +235 -102
  38. package/dist/misc.js.map +1 -1
  39. package/dist/openapi.d.ts +290 -0
  40. package/dist/openapi.d.ts.map +1 -0
  41. package/dist/openapi.js +481 -0
  42. package/dist/openapi.js.map +1 -0
  43. package/dist/router.d.ts +405 -46
  44. package/dist/router.d.ts.map +1 -1
  45. package/dist/router.js +658 -153
  46. package/dist/router.js.map +1 -1
  47. package/dist/static.d.ts +1 -1
  48. package/dist/static.d.ts.map +1 -1
  49. package/dist/static.js +88 -84
  50. package/dist/static.js.map +1 -1
  51. package/package.json +21 -4
  52. package/.npmignore +0 -16
package/dist/git.d.ts CHANGED
@@ -17,7 +17,7 @@ export interface GitHandlerOptions {
17
17
  * repository: (req) => path.join('/srv/git', req.params.repo + '.git')
18
18
  * ```
19
19
  */
20
- repository: (req: RouterRequest) => string | null | undefined | false;
20
+ repository: (req: RouterRequest) => string | null | undefined | false | Promise<string | null | undefined | false>;
21
21
  /**
22
22
  * Directory that contains the `git-upload-pack` executable, including a
23
23
  * trailing path separator (e.g. `'/usr/lib/git-core/'`).
@@ -39,6 +39,38 @@ export interface GitHandlerOptions {
39
39
  */
40
40
  timeout?: number | string;
41
41
  }
42
+ export interface GitCreateOption {
43
+ /**
44
+ * Directory that contains the `git` executable, including a trailing path
45
+ * separator (e.g. `'/usr/lib/git-core/'`).
46
+ *
47
+ * Leave empty (default) to locate the binary via the system `PATH`.
48
+ */
49
+ gitPath?: string;
50
+ /**
51
+ * Human-readable description written to the repository's `description` file.
52
+ *
53
+ * For a bare repository the file is at `<gitDirectory>/description`.
54
+ * For a working-tree repository the file is at `<gitDirectory>/.git/description`.
55
+ *
56
+ * When omitted, no description file is written and Git's default placeholder
57
+ * text is left in place.
58
+ */
59
+ description?: string;
60
+ /**
61
+ * When `true` (the default), the repository is initialised as a **bare**
62
+ * repository — no working tree is created and Git objects are stored directly
63
+ * inside `gitDirectory`. Bare repositories are the standard choice for
64
+ * server-side hosting because they cannot be accidentally modified by editing
65
+ * files directly.
66
+ *
67
+ * When `false`, a regular repository with a working tree is created (equivalent
68
+ * to running `git init <gitDirectory>` on the command line).
69
+ *
70
+ * @default true
71
+ */
72
+ bare?: boolean;
73
+ }
42
74
  /**
43
75
  * Middleware factory that exposes a Git repository over the **Git Smart HTTP
44
76
  * protocol** (read-only fetch / clone, via `git-upload-pack`).
@@ -54,13 +86,11 @@ export interface GitHandlerOptions {
54
86
  *
55
87
  * **Supported endpoints:**
56
88
  *
57
- * | Method | Path | Purpose |
58
- * |--------|-------------------|----------------------------------------------|
59
- * | GET | `/info/refs` | Smart HTTP capability advertisement |
60
- * | POST | `/git-upload-pack`| Pack-file negotiation and transfer |
61
- *
62
- * Only `git-upload-pack` (fetch / clone) is implemented.
63
- * `git-receive-pack` (push) is intentionally excluded.
89
+ * | Method | Path | Purpose |
90
+ * |--------|--------------------|----------------------------------------------|
91
+ * | GET | `/info/refs` | Smart HTTP capability advertisement |
92
+ * | POST | `/git-upload-pack` | Pack-file negotiation and transfer |
93
+ * | POST | `/git-receive-pack`| Pack-file publish and transfer |
64
94
  *
65
95
  * **Compression:** gzip-compressed POST bodies are transparently decompressed
66
96
  * before being piped to `git-upload-pack`.
@@ -70,5 +100,38 @@ export interface GitHandlerOptions {
70
100
  * @throws {TypeError} When `opt.repository` is not a function.
71
101
  */
72
102
  export declare function gitHandler(opt: GitHandlerOptions): (req: RouterRequest, res: RouterResponse) => void;
103
+ /**
104
+ * Initialise a new Git repository at `gitDirectory` by running `git init`.
105
+ *
106
+ * By default a **bare** repository is created (no working tree), which is the
107
+ * conventional layout for server-side hosting. Pass `{ bare: false }` to
108
+ * create a standard repository with a working tree instead.
109
+ *
110
+ * @param gitDirectory - Absolute filesystem path of the directory in which
111
+ * the repository will be created. The directory is created by Git if it
112
+ * does not already exist.
113
+ * @param opt - Creation options. All fields are optional.
114
+ * @param opt.gitPath - Directory containing the `git` binary (with trailing
115
+ * separator). Defaults to `''` so that the system `PATH` is used.
116
+ * @param opt.bare - When `true` (default) a bare repository is created
117
+ * (`git init --bare`). When `false` a regular working-tree repository is
118
+ * created (`git init`).
119
+ * @param opt.description - Text written to the repository's `description`
120
+ * file after initialisation. Bare: `<gitDirectory>/description`;
121
+ * non-bare: `<gitDirectory>/.git/description`. Skipped when omitted.
122
+ * @returns A `Promise` that resolves when the repository has been
123
+ * successfully created, or rejects with an error message string when the
124
+ * `git` process fails to start or exits with a non-zero code.
125
+ *
126
+ * @example
127
+ * ```ts
128
+ * // Create a bare repository (default — suitable for server hosting)
129
+ * await gitCreate('/srv/git/myproject.git', { description: 'My project' });
130
+ *
131
+ * // Create a regular repository with a working tree
132
+ * await gitCreate('/home/user/myproject', { bare: false });
133
+ * ```
134
+ */
135
+ export declare function gitCreate(gitDirectory: string, opt: GitCreateOption): Promise<void>;
73
136
  export default gitHandler;
74
137
  //# sourceMappingURL=git.d.ts.map
package/dist/git.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../src/git.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAMjE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;;;;;;;;;OAaG;IACH,UAAU,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,KAAK,CAAC;IAEtE;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3B;AA6CD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,iBAAiB,GAAG,CAAC,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,cAAc,KAAK,IAAI,CAwIpG;AAyCD,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../src/git.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAOjE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;;;;;;;;;OAaG;IACH,UAAU,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,KAAK,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,KAAK,CAAC,CAAC;IAEnH;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,eAAe;IAC9B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAwCD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,iBAAiB,GAAG,CAAC,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,cAAc,KAAK,IAAI,CA6IpG;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,SAAS,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CA2CnF;AAiCD,eAAe,UAAU,CAAC"}
package/dist/git.js CHANGED
@@ -19,10 +19,9 @@
19
19
  * DEALINGS IN THE SOFTWARE.
20
20
  */
21
21
  'use strict';
22
- Object.defineProperty(exports, "__esModule", { value: true });
23
- exports.gitHandler = gitHandler;
24
- const child_process_1 = require("child_process");
25
- const zlib_1 = require("zlib");
22
+ import { spawn } from 'child_process';
23
+ import { createGunzip } from 'zlib';
24
+ import { writeFileSync } from 'fs';
26
25
  // ---------------------------------------------------------------------------
27
26
  // PKT-LINE helpers
28
27
  // ---------------------------------------------------------------------------
@@ -46,11 +45,6 @@ const zlib_1 = require("zlib");
46
45
  * ```
47
46
  */
48
47
  function pktLine(str) {
49
- // BUG FIX: the original used `str.length` (character count / UTF-16 code
50
- // units) instead of the actual byte length. The Git PKT-LINE spec requires
51
- // the 4-hex-digit prefix to represent the *byte* count of the whole frame
52
- // (prefix + payload). For ASCII-only service names this difference is zero,
53
- // but using Buffer.byteLength is correct and future-proof.
54
48
  const byteLen = Buffer.byteLength(str, 'utf8') + 4; // +4 for the 4-char hex prefix itself
55
49
  return byteLen.toString(16).padStart(4, '0') + str;
56
50
  }
@@ -77,13 +71,11 @@ const PKT_FLUSH = '0000';
77
71
  *
78
72
  * **Supported endpoints:**
79
73
  *
80
- * | Method | Path | Purpose |
81
- * |--------|-------------------|----------------------------------------------|
82
- * | GET | `/info/refs` | Smart HTTP capability advertisement |
83
- * | POST | `/git-upload-pack`| Pack-file negotiation and transfer |
84
- *
85
- * Only `git-upload-pack` (fetch / clone) is implemented.
86
- * `git-receive-pack` (push) is intentionally excluded.
74
+ * | Method | Path | Purpose |
75
+ * |--------|--------------------|----------------------------------------------|
76
+ * | GET | `/info/refs` | Smart HTTP capability advertisement |
77
+ * | POST | `/git-upload-pack` | Pack-file negotiation and transfer |
78
+ * | POST | `/git-receive-pack`| Pack-file publish and transfer |
87
79
  *
88
80
  * **Compression:** gzip-compressed POST bodies are transparently decompressed
89
81
  * before being piped to `git-upload-pack`.
@@ -92,85 +84,93 @@ const PKT_FLUSH = '0000';
92
84
  * @returns An Express-compatible middleware function `(req, res) => void`.
93
85
  * @throws {TypeError} When `opt.repository` is not a function.
94
86
  */
95
- function gitHandler(opt) {
87
+ export function gitHandler(opt) {
96
88
  if (typeof opt.repository !== 'function')
97
89
  throw new TypeError('gitHandler: opt.repository must be a function');
98
- const gitBin = (opt.gitPath ?? '') + 'git-upload-pack';
99
- return (req, res) => {
90
+ const gitHome = opt.gitPath ?? '';
91
+ return async (req, res) => {
100
92
  // Resolve the repository path for this request.
101
- const gitDirectory = opt.repository(req);
102
- if (!gitDirectory)
103
- return void res.status(404).send('Repository not found');
93
+ const gitDirectory = await opt.repository(req);
94
+ if (!gitDirectory) {
95
+ res.status(404).send('Repository not found');
96
+ return;
97
+ }
104
98
  const urlPath = req.path; // sub-path after the mount prefix
105
- // ── GET /info/refs?service=git-upload-pack ──────────────────────────
99
+ // ── GET /info/refs?service=git-xxxxxx-pack ──────────────────────────
106
100
  if (req.method === 'GET' && urlPath === '/info/refs') {
107
- // BUG FIX: `req.queries.url` can be undefined when no query parameters
108
- // are present, causing `req.queries.url.service` to throw a TypeError.
101
+ let args = [];
109
102
  const service = req.queries?.url?.service;
110
- if (service !== 'git-upload-pack')
111
- return void res.status(403).send('Only git-upload-pack is supported');
103
+ if (service === 'git-upload-pack')
104
+ args = buildArgs(opt, ['--stateless-rpc', '--advertise-refs', gitDirectory]);
105
+ else if (service === 'git-receive-pack')
106
+ args = ['--stateless-rpc', '--advertise-refs', gitDirectory];
107
+ else {
108
+ res.status(403).send(`Service ${service} is not supported`);
109
+ return;
110
+ }
112
111
  res.setHeader('Content-Type', `application/x-${service}-advertisement`);
113
112
  res.setHeader('Cache-Control', 'no-cache');
114
113
  // The Smart HTTP advertisement starts with a PKT-LINE service banner
115
114
  // followed by a flush packet (0000), then the git-upload-pack output.
116
115
  res.write(pktLine(`# service=${service}\n`));
117
116
  res.write(PKT_FLUSH);
118
- const args = buildArgs(opt, ['--stateless-rpc', '--advertise-refs', gitDirectory]);
119
- const proc = (0, child_process_1.spawn)(gitBin, args, {
117
+ const proc = spawn(gitHome + service, args, {
120
118
  env: { ...process.env, GIT_PROTOCOL: req.headers['git-protocol'] || '' },
121
119
  });
122
- // BUG FIX: the original did not listen for spawn errors (e.g. ENOENT
123
- // when git is not installed). Without this handler, a missing binary
124
- // causes an uncaught exception that crashes the server process.
125
120
  proc.on('error', (err) => {
126
- console.error('[git-upload-pack refs] spawn error:', err.message);
121
+ console.error(`[${service} GET] spawn error:`, err.message);
127
122
  if (!res.writableEnded)
128
- res.status(500).send(`git-upload-pack unavailable: ${err.message}`);
123
+ res.status(500).send(`${service} unavailable: ${err.message}`);
129
124
  });
130
125
  proc.stdout.pipe(res);
131
126
  proc.stdout.on('error', (err) => {
132
- console.warn('[git-upload-pack refs] stdout error:', err.message);
127
+ console.warn(`[${service} GET] stdout error:`, err.message);
133
128
  });
134
- proc.stderr.on('data', (d) => console.error('[git-upload-pack refs]', d.toString()));
129
+ proc.stderr.on('data', (d) => console.error(`[${service} GET]`, d.toString()));
135
130
  proc.on('close', (code) => {
136
131
  if (code !== 0) {
137
- console.error(`[git-upload-pack refs] exited with code ${code}`);
132
+ console.error(`[${service} GET] exited with code ${code}`);
138
133
  if (!res.writableEnded)
139
- res.status(500).send('git-upload-pack failed');
134
+ res.status(500).send(`${service} failed`);
140
135
  }
141
136
  // When code === 0, proc.stdout has already piped all data and called
142
137
  // res.end() automatically (default pipe behaviour).
143
138
  });
144
139
  return;
145
140
  }
146
- // ── POST /git-upload-pack ───────────────────────────────────────────
147
- if (req.method === 'POST' && urlPath === '/git-upload-pack') {
141
+ // ── POST /git-upload-pack or /git-receive-pack ──────────────────────
142
+ if (req.method === 'POST' && (urlPath === '/git-upload-pack' || urlPath === '/git-receive-pack')) {
148
143
  const contentType = req.headers['content-type'] || '';
149
- // BUG FIX: the original called `res.send(415).send(...)`. Our router's
150
- // `res.send()` signature is `send(body?)` — passing 415 as the body
151
- // writes the number as a string, then the chained `.send()` fails
152
- // because `res.send()` already ended the response. Corrected to
153
- // `res.status(415).send(...)`.
154
- if (contentType !== 'application/x-git-upload-pack-request')
155
- return void res.status(415).send('Unsupported Media Type');
156
- res.setHeader('Content-Type', 'application/x-git-upload-pack-result');
144
+ const service = urlPath.substring(1);
145
+ if (contentType !== `application/x-${service}-request`) {
146
+ res.status(415).send('Unsupported Media Type');
147
+ return;
148
+ }
149
+ let args = [];
150
+ if (service === 'git-upload-pack')
151
+ args = buildArgs(opt, ['--stateless-rpc', gitDirectory]);
152
+ else if (service === 'git-receive-pack')
153
+ args = ['--stateless-rpc', gitDirectory];
154
+ else {
155
+ res.status(403).send(`Service ${service} is not supported`);
156
+ return;
157
+ }
158
+ res.setHeader('Content-Type', `application/x-${service}-result`);
157
159
  res.setHeader('Cache-Control', 'no-cache');
158
- const args = buildArgs(opt, ['--stateless-rpc', gitDirectory]);
159
- const proc = (0, child_process_1.spawn)(gitBin, args, {
160
+ const proc = spawn(gitHome + service, args, {
160
161
  env: { ...process.env, GIT_PROTOCOL: req.headers['git-protocol'] || '' },
161
162
  });
162
- // BUG FIX: same missing spawn-error handler as the GET branch.
163
163
  proc.on('error', (err) => {
164
- console.error('[git-upload-pack pack] spawn error:', err.message);
164
+ console.error(`[${service} POST] spawn error:`, err.message);
165
165
  if (!res.writableEnded)
166
- res.status(500).send(`git-upload-pack unavailable: ${err.message}`);
166
+ res.status(500).send(`${service} unavailable: ${err.message}`);
167
167
  });
168
168
  // Transparently decompress gzip-encoded request bodies.
169
169
  const encoding = req.headers['content-encoding'];
170
170
  if (encoding === 'gzip') {
171
- const gunzip = (0, zlib_1.createGunzip)();
171
+ const gunzip = createGunzip();
172
172
  gunzip.on('error', (err) => {
173
- console.warn('[git-upload-pack pack] gunzip error:', err.message);
173
+ console.warn(`[${service} POST] gunzip error:`, err.message);
174
174
  if (!res.writableEnded)
175
175
  res.status(400).send('Failed to decompress request body');
176
176
  });
@@ -181,24 +181,21 @@ function gitHandler(opt) {
181
181
  }
182
182
  proc.stdout.pipe(res);
183
183
  proc.stdout.on('error', (err) => {
184
- console.warn('[git-upload-pack pack] stdout error:', err.message);
184
+ console.warn(`[${service} POST] stdout error:`, err.message);
185
185
  });
186
- // BUG FIX: the original tagged the POST stderr with the same label as
187
- // the GET branch ('[git-upload-pack refs]'), making log messages from
188
- // the two branches indistinguishable. Corrected to '[git-upload-pack pack]'.
189
- proc.stderr.on('data', (d) => console.error('[git-upload-pack pack]', d.toString()));
186
+ proc.stderr.on('data', (d) => console.error(`[${service} POST]`, d.toString()));
190
187
  proc.on('close', (code) => {
191
188
  if (code !== 0) {
192
- console.error(`[git-upload-pack pack] exited with code ${code}`);
189
+ console.error(`[${service} POST] exited with code ${code}`);
193
190
  if (!res.writableEnded)
194
- res.status(500).send('git-upload-pack failed');
191
+ res.status(500).send(`${service} failed`);
195
192
  }
196
193
  });
197
194
  proc.stdin.on('error', (err) => {
198
195
  // EPIPE is expected when the client disconnects mid-stream; it is not
199
196
  // a server-side fault and does not require an error response.
200
197
  if (err.code !== 'EPIPE')
201
- console.warn('[git-upload-pack pack] stdin error:', err.message);
198
+ console.warn(`[${service} POST] stdin error:`, err.message);
202
199
  });
203
200
  return;
204
201
  }
@@ -206,6 +203,72 @@ function gitHandler(opt) {
206
203
  res.status(404).send('Not found');
207
204
  };
208
205
  }
206
+ /**
207
+ * Initialise a new Git repository at `gitDirectory` by running `git init`.
208
+ *
209
+ * By default a **bare** repository is created (no working tree), which is the
210
+ * conventional layout for server-side hosting. Pass `{ bare: false }` to
211
+ * create a standard repository with a working tree instead.
212
+ *
213
+ * @param gitDirectory - Absolute filesystem path of the directory in which
214
+ * the repository will be created. The directory is created by Git if it
215
+ * does not already exist.
216
+ * @param opt - Creation options. All fields are optional.
217
+ * @param opt.gitPath - Directory containing the `git` binary (with trailing
218
+ * separator). Defaults to `''` so that the system `PATH` is used.
219
+ * @param opt.bare - When `true` (default) a bare repository is created
220
+ * (`git init --bare`). When `false` a regular working-tree repository is
221
+ * created (`git init`).
222
+ * @param opt.description - Text written to the repository's `description`
223
+ * file after initialisation. Bare: `<gitDirectory>/description`;
224
+ * non-bare: `<gitDirectory>/.git/description`. Skipped when omitted.
225
+ * @returns A `Promise` that resolves when the repository has been
226
+ * successfully created, or rejects with an error message string when the
227
+ * `git` process fails to start or exits with a non-zero code.
228
+ *
229
+ * @example
230
+ * ```ts
231
+ * // Create a bare repository (default — suitable for server hosting)
232
+ * await gitCreate('/srv/git/myproject.git', { description: 'My project' });
233
+ *
234
+ * // Create a regular repository with a working tree
235
+ * await gitCreate('/home/user/myproject', { bare: false });
236
+ * ```
237
+ */
238
+ export function gitCreate(gitDirectory, opt) {
239
+ return new Promise((resolve, reject) => {
240
+ const gitHome = opt.gitPath ?? '';
241
+ const isBare = opt.bare !== false; // default true
242
+ const args = isBare
243
+ ? ['init', '--bare', gitDirectory]
244
+ : ['init', gitDirectory];
245
+ const proc = spawn(gitHome + 'git', args, {
246
+ env: { ...process.env },
247
+ });
248
+ proc.on('error', (err) => {
249
+ console.error(`[git init] spawn error:`, err.message);
250
+ reject(`git unavailable: ${err.message}`);
251
+ });
252
+ proc.stdout.on('error', (err) => {
253
+ console.warn(`[git init] stdout error:`, err.message);
254
+ });
255
+ proc.stderr.on('data', (d) => console.error(`[git init]`, d.toString()));
256
+ proc.on('close', (code) => {
257
+ if (code !== 0) {
258
+ return reject('git failed');
259
+ }
260
+ if (opt.description) {
261
+ // Bare repos store the description at the root; working-tree repos
262
+ // store it inside the hidden .git sub-directory.
263
+ const descPath = isBare
264
+ ? `${gitDirectory}/description`
265
+ : `${gitDirectory}/.git/description`;
266
+ writeFileSync(descPath, opt.description);
267
+ }
268
+ resolve();
269
+ });
270
+ });
271
+ }
209
272
  // ---------------------------------------------------------------------------
210
273
  // Internal helpers
211
274
  // ---------------------------------------------------------------------------
@@ -224,21 +287,13 @@ function gitHandler(opt) {
224
287
  function buildArgs(opt, trailing) {
225
288
  const args = [];
226
289
  if (opt.timeout) {
227
- // BUG FIX: `parseInt` without an explicit radix may misinterpret strings
228
- // that start with '0' as octal in some environments. Always pass base 10.
229
290
  const seconds = parseInt(String(opt.timeout), 10);
230
291
  if (!isNaN(seconds) && seconds > 0)
231
292
  args.push(`--timeout=${seconds}`);
232
293
  }
233
- // BUG FIX: the original used `opt.bareOnly ? '--strict' : '--no-strict'`.
234
- // `git-upload-pack` does not accept `--strict` — that flag belongs to
235
- // `git-receive-pack`. The correct option for upload-pack is `--no-strict`
236
- // (which relaxes the requirement that the path must be a bare repository).
237
- // When the caller sets `strict: true` we simply omit `--no-strict`; when
238
- // `strict` is false (default) we pass `--no-strict` to allow non-bare repos.
239
294
  if (!opt.strict)
240
295
  args.push('--no-strict');
241
296
  return [...args, ...trailing];
242
297
  }
243
- exports.default = gitHandler;
298
+ export default gitHandler;
244
299
  //# sourceMappingURL=git.js.map
package/dist/git.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"git.js","sourceRoot":"","sources":["../src/git.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,YAAY,CAAC;;AAgIb,gCAwIC;AAtQD,iDAA4C;AAC5C,+BAAoC;AAoDpC,8EAA8E;AAC9E,mBAAmB;AACnB,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;;GAkBG;AACH,SAAS,OAAO,CAAC,GAAW;IAC1B,yEAAyE;IACzE,2EAA2E;IAC3E,0EAA0E;IAC1E,4EAA4E;IAC5E,2DAA2D;IAC3D,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,sCAAsC;IAC1F,OAAO,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC;AACrD,CAAC;AAED;;;GAGG;AACH,MAAM,SAAS,GAAG,MAAM,CAAC;AAEzB,8EAA8E;AAC9E,qBAAqB;AACrB,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,SAAgB,UAAU,CAAC,GAAsB;IAC/C,IAAI,OAAO,GAAG,CAAC,UAAU,KAAK,UAAU;QACtC,MAAM,IAAI,SAAS,CAAC,+CAA+C,CAAC,CAAC;IAEvE,MAAM,MAAM,GAAG,CAAC,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,GAAG,iBAAiB,CAAC;IAEvD,OAAO,CAAC,GAAkB,EAAE,GAAmB,EAAQ,EAAE;QACvD,gDAAgD;QAChD,MAAM,YAAY,GAAG,GA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,GAAG,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QAClD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,OAAO,GAAG,CAAC;YAChC,IAAI,CAAC,IAAI,CAAC,aAAa,OAAO,EAAE,CAAC,CAAC;IACtC,CAAC;IAED,IAAI,CAAC,GAAG,CAAC,MAAM;QACb,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAE3B,OAAO,CAAC,GAAG,IAAI,EAAE,GAAG,QAAQ,CAAC,CAAC;AAChC,CAAC;AAED,eAAe,UAAU,CAAC"}
package/dist/index.d.ts CHANGED
@@ -2,20 +2,24 @@
2
2
  * @module expediate
3
3
  * TypeScript package for web server routing.
4
4
  */
5
- import createRouter from './router';
5
+ import createRouter from './router.js';
6
6
  export { createRouter };
7
- export type { Router, RouterRequest, RouterResponse, Middleware, MiddlewareArg, NextFunction, Layer, CookieOptions, TlsOptions, StringMap, } from './router';
8
- export { serveStatic, serveFile, sendFile, mime } from './static';
9
- export type { StaticOptions, Mime } from './static';
10
- export { json, formData, parseBody, logger } from './misc';
11
- export type { BodyOptions, LoggerOptions, FormPart, } from './misc';
12
- import createJwtPlugin from './jwt-auth';
7
+ export type { Router, RouterOptions, RouterRequest, RouterResponse, Middleware, MiddlewareArg, NextFunction, ErrorHandler, Layer, RouteInfo, CookieOptions, TlsOptions, StringMap, } from './router.js';
8
+ export { serveStatic, serveFile, sendFile, mime } from './static.js';
9
+ export type { StaticOptions, Mime } from './static.js';
10
+ export { json, formData, formEncoded, parseBody, logger, cors, streamFormData, parseMultipartBody } from './misc.js';
11
+ export type { BodyOptions, LoggerOptions, FormPart, FormPartStream, CorsOptions, } from './misc.js';
12
+ import createJwtPlugin from './jwt-auth.js';
13
13
  export { createJwtPlugin };
14
- export type { JwtPlugin, JwtConfig } from './jwt-auth';
15
- import gitHandler from './git';
16
- export { gitHandler };
17
- export type { GitHandlerOptions, } from './git';
18
- import apiBuilder from './apis';
14
+ export { createMapTokenStore } from './jwt-auth.js';
15
+ export type { JwtPlugin, JwtConfig, TokenStore, RefreshTokenRecord, TokenPayload, UserRecord, } from './jwt-auth.js';
16
+ export { gitHandler, gitCreate } from './git.js';
17
+ export type { GitHandlerOptions, } from './git.js';
18
+ import apiBuilder from './apis.js';
19
19
  export { apiBuilder };
20
- export type { ApiError, ServiceMethod, ServiceInstance, ServiceMethods, RouteMap, ServiceDefinition } from './apis';
20
+ export type { ApiError, ServiceMethod, ServiceInstance, ServiceMethods, RouteMap, ServiceDefinition, ApiRouter, ApiRouterExtensions, ApiContext, } from './apis.js';
21
+ export { describe, openApiSpec, serializeSpec, DESCRIBE_META } from './openapi.js';
22
+ export type { JsonSchema, ParameterObject, RequestBodyObject, ResponseObject, OperationMeta, OpenApiServiceMeta, SpecOptions, SpecFormat, OpenApiDocument, } from './openapi.js';
23
+ export { compress, requestId, rateLimit, cacheControl, csrf, securityHeaders, conditionalGet } from './middleware.js';
24
+ export type { CompressOptions, RequestIdOptions, RateLimitOptions, CacheControlOptions, CsrfOptions, SecurityHeadersOptions, } from './middleware.js';
21
25
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAoBA;;;GAGG;AAGH,OAAO,YAAY,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,CAAA;AACvB,YAAY,EACV,MAAM,EACN,aAAa,EACb,cAAc,EACd,UAAU,EACV,aAAa,EACb,YAAY,EACZ,KAAK,EACL,aAAa,EACb,UAAU,EACV,SAAS,GACV,MAAM,UAAU,CAAC;AAIlB,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAClE,YAAY,EACV,aAAa,EACb,IAAI,EACL,MAAM,UAAU,CAAC;AAIlB,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,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B,OAAO,eAAe,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,YAAY,EACV,SAAS,EACT,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,YAAY,EACZ,UAAU,GACX,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACjD,YAAY,EACR,iBAAiB,GACpB,MAAM,UAAU,CAAC;AAGlB,OAAO,UAAU,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,CAAA;AACrB,YAAY,EACR,QAAQ,EACR,aAAa,EACb,eAAe,EACf,cAAc,EACd,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,mBAAmB,EACnB,UAAU,GACb,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACnF,YAAY,EACR,UAAU,EACV,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,UAAU,EACV,eAAe,GAClB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtH,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,WAAW,EACX,sBAAsB,GACvB,MAAM,iBAAiB,CAAC"}
package/dist/index.js CHANGED
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  /* Copyright 2021 Fabien Bavent
3
2
  *
4
3
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -23,33 +22,24 @@
23
22
  * @module expediate
24
23
  * TypeScript package for web server routing.
25
24
  */
26
- var __importDefault = (this && this.__importDefault) || function (mod) {
27
- return (mod && mod.__esModule) ? mod : { "default": mod };
28
- };
29
- Object.defineProperty(exports, "__esModule", { value: true });
30
- exports.apiBuilder = exports.gitHandler = exports.createJwtPlugin = exports.logger = exports.parseBody = exports.formData = exports.json = exports.mime = exports.sendFile = exports.serveFile = exports.serveStatic = exports.createRouter = void 0;
31
25
  // ── Router ────────────────────────────────────────────────────────────────────
32
- const router_1 = __importDefault(require("./router"));
33
- exports.createRouter = router_1.default;
26
+ import createRouter from './router.js';
27
+ export { createRouter };
34
28
  // ── Static ────────────────────────────────────────────────────────────────────
35
- var static_1 = require("./static");
36
- Object.defineProperty(exports, "serveStatic", { enumerable: true, get: function () { return static_1.serveStatic; } });
37
- Object.defineProperty(exports, "serveFile", { enumerable: true, get: function () { return static_1.serveFile; } });
38
- Object.defineProperty(exports, "sendFile", { enumerable: true, get: function () { return static_1.sendFile; } });
39
- Object.defineProperty(exports, "mime", { enumerable: true, get: function () { return static_1.mime; } });
29
+ export { serveStatic, serveFile, sendFile, mime } from './static.js';
40
30
  // ── Miscallenous ──────────────────────────────────────────────────────────────
41
- var misc_1 = require("./misc");
42
- Object.defineProperty(exports, "json", { enumerable: true, get: function () { return misc_1.json; } });
43
- Object.defineProperty(exports, "formData", { enumerable: true, get: function () { return misc_1.formData; } });
44
- Object.defineProperty(exports, "parseBody", { enumerable: true, get: function () { return misc_1.parseBody; } });
45
- Object.defineProperty(exports, "logger", { enumerable: true, get: function () { return misc_1.logger; } });
31
+ export { json, formData, formEncoded, parseBody, logger, cors, streamFormData, parseMultipartBody } from './misc.js';
46
32
  // ── JWT Authentication ────────────────────────────────────────────────────────
47
- const jwt_auth_1 = __importDefault(require("./jwt-auth"));
48
- exports.createJwtPlugin = jwt_auth_1.default;
33
+ import createJwtPlugin from './jwt-auth.js';
34
+ export { createJwtPlugin };
35
+ export { createMapTokenStore } from './jwt-auth.js';
49
36
  // ── Git repository ────────────────────────────────────────────────────────────
50
- const git_1 = __importDefault(require("./git"));
51
- exports.gitHandler = git_1.default;
37
+ export { gitHandler, gitCreate } from './git.js';
52
38
  // ── API Service ───────────────────────────────────────────────────────────────
53
- const apis_1 = __importDefault(require("./apis"));
54
- exports.apiBuilder = apis_1.default;
39
+ import apiBuilder from './apis.js';
40
+ export { apiBuilder };
41
+ // ── OpenAPI spec generation ───────────────────────────────────────────────────
42
+ export { describe, openApiSpec, serializeSpec, DESCRIBE_META } from './openapi.js';
43
+ // ── Middleware ────────────────────────────────────────────────────────────────
44
+ export { compress, requestId, rateLimit, cacheControl, csrf, securityHeaders, conditionalGet } from './middleware.js';
55
45
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH;;;GAGG;;;;;;AAEH,iFAAiF;AACjF,sDAAoC;AAC3B,uBADF,gBAAY,CACE;AAcrB,iFAAiF;AAEjF,mCAAkE;AAAzD,qGAAA,WAAW,OAAA;AAAE,mGAAA,SAAS,OAAA;AAAE,kGAAA,QAAQ,OAAA;AAAE,8FAAA,IAAI,OAAA;AAM/C,iFAAiF;AAEjF,+BAA2D;AAAlD,4FAAA,IAAI,OAAA;AAAE,gGAAA,QAAQ,OAAA;AAAE,iGAAA,SAAS,OAAA;AAAE,8FAAA,MAAM,OAAA;AAO1C,iFAAiF;AACjF,0DAAwC;AAC/B,0BADF,kBAAe,CACE;AAMxB,iFAAiF;AACjF,gDAA+B;AACtB,qBADD,aAAU,CACC;AAKnB,iFAAiF;AACjF,kDAA+B;AACtB,qBADF,cAAU,CACE"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH;;;GAGG;AAEH,iFAAiF;AACjF,OAAO,YAAY,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,CAAA;AAiBvB,iF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