@technomoron/mail-magic-client 1.0.35 → 2.0.0-beta1

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/CHANGES CHANGED
@@ -1,6 +1,30 @@
1
1
  CHANGES
2
2
  =======
3
3
 
4
+ Unreleased (2026-03-07)
5
+
6
+ - fix(release): switch the GitHub client publish job to npm trusted publishing by removing the forced `NODE_AUTH_TOKEN`, so npm can authorize `release-mail-magic-client.yml` through the configured OIDC publisher instead of the repository token.
7
+ - fix(release): move the GitHub client workflow npm auth token to job scope so the publish step inherits the same registry credentials used earlier in the run instead of overriding them with an empty step-local value.
8
+ - fix(release): allow the GitHub client workflow to publish and create the GitHub release when manually dispatched on an existing client tag, so a failed tagged release can be retried without minting a new version.
9
+ - chore(release): add package-local `release:preflight` support so a single package can run cleanbuild, tests, and local release checks from its own directory.
10
+ - chore(release): stop using `setup-node` pnpm caching in the GitHub client release workflow because this repo does not ship a `pnpm-lock.yaml`.
11
+ - chore(release): install workspace dependencies with `pnpm install --no-frozen-lockfile --link-workspace-packages` in the GitHub client release workflow because this repo does not ship a `pnpm-lock.yaml` and the CLI depends on the local prerelease client package.
12
+ - chore(release): add a repo-level pnpm build-script allowlist for `sqlite3` and `esbuild`, while explicitly blocking `@scarf/scarf`, so clean GitHub installs can run the shared test/build pipeline before publishing the client.
13
+ - (Changes generated/assisted by Codex (profile: openai-gpt-5-codex/medium).)
14
+
15
+ Version 2.0.0-beta1 (2026-03-07)
16
+
17
+ - chore(release): stage the `2.0.0-beta1` prerelease and align package metadata with it.
18
+ - chore(release): add shared local/CI release verification flow and update the GitHub client release workflow to use it on Node 24.
19
+ - chore(release): publish tagged GitHub client releases to npm via a shared `npm publish` flow and add a local publish dry-run path for pre-tag testing.
20
+ - (Changes generated/assisted by Codex (profile: openai-gpt-5-codex/medium).)
21
+
22
+ Version 1.0.36 (2026-03-06)
23
+
24
+ - feat(client): add `triggerReload()` method to trigger a server-side force-reload via `POST /api/v1/reload`.
25
+ - docs(readme): remove references to server-side `ASSET_ROUTE` config and describe the fixed `/asset` and compatibility `/api/asset` routes.
26
+ - (Changes generated/assisted by Codex (profile: openai-gpt-5-codex/medium).)
27
+
4
28
  Version 1.0.35 (2026-03-05)
5
29
 
6
30
  - fix(client): check response `content-type` header in `postFormData` before calling `response.json()`; extract shared `parseJsonResponse` helper used by both `request()` and `postFormData()`.
package/README.md CHANGED
@@ -104,7 +104,6 @@ The CLI is now a separate package: `@technomoron/mail-magic-cli`.
104
104
  - `await client.fetchPublicAsset('example.test', 'images/logo.png')` -> `/asset/{domain}/{path}`
105
105
  - `await client.fetchPublicAsset('example.test', 'images/logo.png', true)` -> `/api/asset/{domain}/{path}`
106
106
 
107
- The third argument `viaApiBase` (default `false`) switches the route prefix. Use `false` (default) when the server
108
- is configured to serve assets directly under `ASSET_ROUTE` (default `/asset`). Use `true` when you need to reach
109
- assets via the API base path (e.g. `/api/asset`) — useful when the server is behind a reverse proxy that only
110
- forwards requests under a single path prefix.
107
+ The third argument `viaApiBase` (default `false`) switches the route prefix. Use `false` (default) for the normal
108
+ public asset route (`/asset`). Use `true` when you need the compatibility API route (`/api/asset`) — useful when a
109
+ reverse proxy only forwards requests under the API prefix.
@@ -100,6 +100,9 @@ declare class TemplateClient {
100
100
  storeFormRecipient(data: StoreFormRecipientInput): Promise<ApiResponse>;
101
101
  sendFormMessage(data: SendFormMessageInput): Promise<ApiResponse>;
102
102
  uploadAssets(data: UploadAssetsInput): Promise<ApiResponse>;
103
+ triggerReload(): Promise<ApiResponse<{
104
+ reload: string;
105
+ }>>;
103
106
  getSwaggerSpec(): Promise<ApiResponse>;
104
107
  fetchPublicAsset(domain: string, assetPath: string, viaApiBase?: boolean): Promise<ArrayBuffer>;
105
108
  }
@@ -293,6 +293,9 @@ class TemplateClient {
293
293
  });
294
294
  return this.postFormData('/api/v1/assets', formData);
295
295
  }
296
+ async triggerReload() {
297
+ return this.post('/api/v1/reload', {});
298
+ }
296
299
  async getSwaggerSpec() {
297
300
  return this.get('/api/swagger');
298
301
  }
@@ -288,6 +288,9 @@ class TemplateClient {
288
288
  });
289
289
  return this.postFormData('/api/v1/assets', formData);
290
290
  }
291
+ async triggerReload() {
292
+ return this.post('/api/v1/reload', {});
293
+ }
291
294
  async getSwaggerSpec() {
292
295
  return this.get('/api/swagger');
293
296
  }
package/package.json CHANGED
@@ -1,47 +1,49 @@
1
1
  {
2
- "name": "@technomoron/mail-magic-client",
3
- "version": "1.0.35",
4
- "description": "Client library for mail-magic",
5
- "main": "dist/cjs/mail-magic-client.js",
6
- "types": "dist/cjs/mail-magic-client.d.ts",
7
- "module": "dist/esm/mail-magic-client.js",
8
- "repository": {
9
- "type": "git",
10
- "url": "git+https://github.com/technomoron/mail-magic.git",
11
- "directory": "packages/client"
12
- },
13
- "author": "Bjørn Erik Jacobsen",
14
- "license": "MIT",
15
- "files": [
16
- "dist/**/*.js",
17
- "dist/**/*.d.ts",
18
- "package.json",
19
- "CHANGES"
20
- ],
21
- "dependencies": {
22
- "email-addresses": "^5.0.0",
23
- "nunjucks": "^3.2.4"
24
- },
25
- "devDependencies": {
26
- "@types/node": "^20.19.11",
27
- "@types/nunjucks": "^3.2.6",
28
- "typescript": "^5.9.2",
29
- "vitest": "^4.0.16"
30
- },
31
- "scripts": {
32
- "scrub": "rimraf node_modules pnpm-lock.yaml package-lock.json yarn.lock lib/ dist/",
33
- "build:cjs": "tsc --project tsconfig/tsconfig.cjs.json",
34
- "build:esm": "tsc --project tsconfig/tsconfig.esm.json",
35
- "build": "run-s build:cjs build:esm",
36
- "test": "vitest run --silent --reporter=dot",
37
- "test:watch": "vitest",
38
- "lint": "node ../../node_modules/eslint/bin/eslint.js --config ../../eslint.config.mjs --no-error-on-unmatched-pattern ./src",
39
- "lintfix": "node ../../node_modules/eslint/bin/eslint.js --config ../../eslint.config.mjs --fix --no-error-on-unmatched-pattern ./src",
40
- "format": "run-s lintfix pretty",
41
- "pretty": "node ../../node_modules/prettier/bin/prettier.cjs --config ../../.prettierrc --write \"**/*.{js,ts,vue,json,css,scss,md}\"",
42
- "cleanbuild": "run-s clean:dist format build",
43
- "clean:dist": "rimraf ./dist/",
44
- "release": "bash ../../scripts/release-package.sh .",
45
- "release:check": "bash ../../scripts/release-package-check.sh ."
46
- }
47
- }
2
+ "name": "@technomoron/mail-magic-client",
3
+ "version": "2.0.0-beta1",
4
+ "description": "Client library for mail-magic",
5
+ "main": "dist/cjs/mail-magic-client.js",
6
+ "types": "dist/cjs/mail-magic-client.d.ts",
7
+ "module": "dist/esm/mail-magic-client.js",
8
+ "scripts": {
9
+ "prepare": "run-s build",
10
+ "scrub": "rimraf node_modules pnpm-lock.yaml package-lock.json yarn.lock lib/ dist/",
11
+ "build:cjs": "tsc --project tsconfig/tsconfig.cjs.json",
12
+ "build:esm": "tsc --project tsconfig/tsconfig.esm.json",
13
+ "build": "run-s build:cjs build:esm",
14
+ "test": "vitest run --silent --reporter=dot",
15
+ "test:watch": "vitest",
16
+ "lint": "node ../../node_modules/eslint/bin/eslint.js --config ../../eslint.config.mjs --no-error-on-unmatched-pattern ./src",
17
+ "lintfix": "node ../../node_modules/eslint/bin/eslint.js --config ../../eslint.config.mjs --fix --no-error-on-unmatched-pattern ./src",
18
+ "format": "run-s lintfix pretty",
19
+ "pretty": "node ../../node_modules/prettier/bin/prettier.cjs --config ../../.prettierrc --write \"**/*.{js,ts,vue,json,css,scss,md}\"",
20
+ "cleanbuild": "run-s clean:dist format build",
21
+ "clean:dist": "rimraf ./dist/",
22
+ "release": "bash ../../scripts/release-package.sh .",
23
+ "release:check": "bash ../../scripts/release-package-check.sh .",
24
+ "release:preflight": "bash ../../scripts/release-package-preflight.sh ."
25
+ },
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/technomoron/mail-magic.git",
29
+ "directory": "packages/client"
30
+ },
31
+ "author": "Bjørn Erik Jacobsen",
32
+ "license": "MIT",
33
+ "files": [
34
+ "dist/**/*.js",
35
+ "dist/**/*.d.ts",
36
+ "package.json",
37
+ "CHANGES"
38
+ ],
39
+ "dependencies": {
40
+ "email-addresses": "^5.0.0",
41
+ "nunjucks": "^3.2.4"
42
+ },
43
+ "devDependencies": {
44
+ "@types/node": "^20.19.11",
45
+ "@types/nunjucks": "^3.2.6",
46
+ "typescript": "^5.9.2",
47
+ "vitest": "^4.0.16"
48
+ }
49
+ }