@shipfox/client-shell 8.0.0 → 10.0.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/vite/manifest.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,MAAM,EAAiB,MAAM,MAAM,CAAC;AAqBjD,wBAAgB,qBAAqB,IAAI,MAAM,CAwF9C"}
1
+ {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/vite/manifest.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,MAAM,EAAiB,MAAM,MAAM,CAAC;AAwBjD,wBAAgB,qBAAqB,IAAI,MAAM,CAwF9C"}
@@ -8,7 +8,10 @@ const assetNames = [
8
8
  'apple-touch-icon.png',
9
9
  'site.webmanifest',
10
10
  'web-app-manifest-192x192.png',
11
- 'web-app-manifest-512x512.png'
11
+ 'web-app-manifest-512x512.png',
12
+ // Transactional emails (@shipfox/node-email) link to this asset on the client
13
+ // origin, so every composed client must serve it.
14
+ 'email-logo.png'
12
15
  ];
13
16
  const assetDirectory = fileURLToPath(new URL('../../assets/', import.meta.url));
14
17
  const contentTypes = {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/vite/manifest.ts"],"sourcesContent":["import {access, readFile} from 'node:fs/promises';\nimport {extname, resolve} from 'node:path';\nimport {fileURLToPath} from 'node:url';\nimport type {Plugin, ResolvedConfig} from 'vite';\n\nconst assetNames = [\n 'favicon.ico',\n 'favicon.svg',\n 'favicon-96x96.png',\n 'apple-touch-icon.png',\n 'site.webmanifest',\n 'web-app-manifest-192x192.png',\n 'web-app-manifest-512x512.png',\n] as const;\n\nconst assetDirectory = fileURLToPath(new URL('../../assets/', import.meta.url));\n\nconst contentTypes: Record<string, string> = {\n '.ico': 'image/x-icon',\n '.png': 'image/png',\n '.svg': 'image/svg+xml',\n '.webmanifest': 'application/manifest+json',\n};\n\nexport function shipfoxClientManifest(): Plugin {\n let config: ResolvedConfig | undefined;\n\n function assetPath(name: (typeof assetNames)[number]): string {\n return resolve(assetDirectory, name);\n }\n\n async function assertNoPublicAssetConflicts(): Promise<void> {\n const publicDirectory = config?.publicDir;\n if (!publicDirectory) return;\n const conflicts = (\n await Promise.all(\n assetNames.map((name) => {\n const publicAsset = resolve(publicDirectory, name);\n if (publicAsset === assetPath(name)) return undefined;\n return access(publicAsset)\n .then(() => name)\n .catch(() => undefined);\n }),\n )\n ).filter((name): name is (typeof assetNames)[number] => name !== undefined);\n if (conflicts.length === 0) return;\n throw new Error(\n `shipfoxClientManifest() owns ${conflicts.map((name) => `/${name}`).join(', ')}. Remove the conflicting files from ${publicDirectory}.`,\n );\n }\n\n return {\n name: 'shipfox-client-manifest',\n async configResolved(resolvedConfig) {\n config = resolvedConfig;\n await assertNoPublicAssetConflicts();\n },\n async buildStart() {\n if (config?.command !== 'build') return;\n for (const name of assetNames) {\n this.emitFile({type: 'asset', fileName: name, source: await readFile(assetPath(name))});\n }\n },\n configureServer(server) {\n server.middlewares.use(async (request, response, next) => {\n const name = assetNames.find((assetName) => request.url?.split('?')[0] === `/${assetName}`);\n if (!name) return next();\n\n try {\n const content = await readFile(assetPath(name));\n response.setHeader(\n 'Content-Type',\n contentTypes[extname(name)] ?? 'application/octet-stream',\n );\n response.end(content);\n } catch (error) {\n next(error);\n }\n });\n },\n transformIndexHtml: {\n order: 'pre',\n handler() {\n return [\n {tag: 'title', children: 'Shipfox', injectTo: 'head'},\n {\n tag: 'link',\n attrs: {rel: 'icon', type: 'image/png', href: '/favicon-96x96.png', sizes: '96x96'},\n injectTo: 'head',\n },\n {\n tag: 'link',\n attrs: {rel: 'icon', type: 'image/svg+xml', href: '/favicon.svg'},\n injectTo: 'head',\n },\n {tag: 'link', attrs: {rel: 'shortcut icon', href: '/favicon.ico'}, injectTo: 'head'},\n {\n tag: 'link',\n attrs: {rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon.png'},\n injectTo: 'head',\n },\n {tag: 'link', attrs: {rel: 'manifest', href: '/site.webmanifest'}, injectTo: 'head'},\n {\n tag: 'meta',\n attrs: {name: 'apple-mobile-web-app-title', content: 'Shipfox'},\n injectTo: 'head',\n },\n {tag: 'meta', attrs: {name: 'theme-color', content: '#ff4b00'}, injectTo: 'head'},\n ];\n },\n },\n };\n}\n"],"names":["access","readFile","extname","resolve","fileURLToPath","assetNames","assetDirectory","URL","url","contentTypes","shipfoxClientManifest","config","assetPath","name","assertNoPublicAssetConflicts","publicDirectory","publicDir","conflicts","Promise","all","map","publicAsset","undefined","then","catch","filter","length","Error","join","configResolved","resolvedConfig","buildStart","command","emitFile","type","fileName","source","configureServer","server","middlewares","use","request","response","next","find","assetName","split","content","setHeader","end","error","transformIndexHtml","order","handler","tag","children","injectTo","attrs","rel","href","sizes"],"mappings":"AAAA,SAAQA,MAAM,EAAEC,QAAQ,QAAO,mBAAmB;AAClD,SAAQC,OAAO,EAAEC,OAAO,QAAO,YAAY;AAC3C,SAAQC,aAAa,QAAO,WAAW;AAGvC,MAAMC,aAAa;IACjB;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAED,MAAMC,iBAAiBF,cAAc,IAAIG,IAAI,iBAAiB,YAAYC,GAAG;AAE7E,MAAMC,eAAuC;IAC3C,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,gBAAgB;AAClB;AAEA,OAAO,SAASC;IACd,IAAIC;IAEJ,SAASC,UAAUC,IAAiC;QAClD,OAAOV,QAAQG,gBAAgBO;IACjC;IAEA,eAAeC;QACb,MAAMC,kBAAkBJ,QAAQK;QAChC,IAAI,CAACD,iBAAiB;QACtB,MAAME,YAAY,AAChB,CAAA,MAAMC,QAAQC,GAAG,CACfd,WAAWe,GAAG,CAAC,CAACP;YACd,MAAMQ,cAAclB,QAAQY,iBAAiBF;YAC7C,IAAIQ,gBAAgBT,UAAUC,OAAO,OAAOS;YAC5C,OAAOtB,OAAOqB,aACXE,IAAI,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C,OAAO;wBAAO;wBAClFJ,UAAU;oBACZ;oBACA;wBACEF,KAAK;wBACLG,OAAO;4BAACC,KAAK;4BAAQxB,MAAM;4BAAiByB,MAAM;wBAAc;wBAChEH,UAAU;oBACZ;oBACA;wBAACF,KAAK;wBAAQG,OAAO;4BAACC,KAAK;4BAAiBC,MAAM;wBAAc;wBAAGH,UAAU;oBAAM;oBACnF;wBACEF,KAAK;wBACLG,OAAO;4BAACC,KAAK;4BAAoBE,OAAO;4BAAWD,MAAM;wBAAuB;wBAChFH,UAAU;oBACZ;oBACA;wBAACF,KAAK;wBAAQG,OAAO;4BAACC,KAAK;4BAAYC,MAAM;wBAAmB;wBAAGH,UAAU;oBAAM;oBACnF;wBACEF,KAAK;wBACLG,OAAO;4BAAC5C,MAAM;4BAA8BkC,SAAS;wBAAS;wBAC9DS,UAAU;oBACZ;oBACA;wBAACF,KAAK;wBAAQG,OAAO;4BAAC5C,MAAM;4BAAekC,SAAS;wBAAS;wBAAGS,UAAU;oBAAM;iBACjF;YACH;QACF;IACF;AACF"}
1
+ {"version":3,"sources":["../../src/vite/manifest.ts"],"sourcesContent":["import {access, readFile} from 'node:fs/promises';\nimport {extname, resolve} from 'node:path';\nimport {fileURLToPath} from 'node:url';\nimport type {Plugin, ResolvedConfig} from 'vite';\n\nconst assetNames = [\n 'favicon.ico',\n 'favicon.svg',\n 'favicon-96x96.png',\n 'apple-touch-icon.png',\n 'site.webmanifest',\n 'web-app-manifest-192x192.png',\n 'web-app-manifest-512x512.png',\n // Transactional emails (@shipfox/node-email) link to this asset on the client\n // origin, so every composed client must serve it.\n 'email-logo.png',\n] as const;\n\nconst assetDirectory = fileURLToPath(new URL('../../assets/', import.meta.url));\n\nconst contentTypes: Record<string, string> = {\n '.ico': 'image/x-icon',\n '.png': 'image/png',\n '.svg': 'image/svg+xml',\n '.webmanifest': 'application/manifest+json',\n};\n\nexport function shipfoxClientManifest(): Plugin {\n let config: ResolvedConfig | undefined;\n\n function assetPath(name: (typeof assetNames)[number]): string {\n return resolve(assetDirectory, name);\n }\n\n async function assertNoPublicAssetConflicts(): Promise<void> {\n const publicDirectory = config?.publicDir;\n if (!publicDirectory) return;\n const conflicts = (\n await Promise.all(\n assetNames.map((name) => {\n const publicAsset = resolve(publicDirectory, name);\n if (publicAsset === assetPath(name)) return undefined;\n return access(publicAsset)\n .then(() => name)\n .catch(() => undefined);\n }),\n )\n ).filter((name): name is (typeof assetNames)[number] => name !== undefined);\n if (conflicts.length === 0) return;\n throw new Error(\n `shipfoxClientManifest() owns ${conflicts.map((name) => `/${name}`).join(', ')}. Remove the conflicting files from ${publicDirectory}.`,\n );\n }\n\n return {\n name: 'shipfox-client-manifest',\n async configResolved(resolvedConfig) {\n config = resolvedConfig;\n await assertNoPublicAssetConflicts();\n },\n async buildStart() {\n if (config?.command !== 'build') return;\n for (const name of assetNames) {\n this.emitFile({type: 'asset', fileName: name, source: await readFile(assetPath(name))});\n }\n },\n configureServer(server) {\n server.middlewares.use(async (request, response, next) => {\n const name = assetNames.find((assetName) => request.url?.split('?')[0] === `/${assetName}`);\n if (!name) return next();\n\n try {\n const content = await readFile(assetPath(name));\n response.setHeader(\n 'Content-Type',\n contentTypes[extname(name)] ?? 'application/octet-stream',\n );\n response.end(content);\n } catch (error) {\n next(error);\n }\n });\n },\n transformIndexHtml: {\n order: 'pre',\n handler() {\n return [\n {tag: 'title', children: 'Shipfox', injectTo: 'head'},\n {\n tag: 'link',\n attrs: {rel: 'icon', type: 'image/png', href: '/favicon-96x96.png', sizes: '96x96'},\n injectTo: 'head',\n },\n {\n tag: 'link',\n attrs: {rel: 'icon', type: 'image/svg+xml', href: '/favicon.svg'},\n injectTo: 'head',\n },\n {tag: 'link', attrs: {rel: 'shortcut icon', href: '/favicon.ico'}, injectTo: 'head'},\n {\n tag: 'link',\n attrs: {rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon.png'},\n injectTo: 'head',\n },\n {tag: 'link', attrs: {rel: 'manifest', href: '/site.webmanifest'}, injectTo: 'head'},\n {\n tag: 'meta',\n attrs: {name: 'apple-mobile-web-app-title', content: 'Shipfox'},\n injectTo: 'head',\n },\n {tag: 'meta', attrs: {name: 'theme-color', content: '#ff4b00'}, injectTo: 'head'},\n ];\n },\n },\n };\n}\n"],"names":["access","readFile","extname","resolve","fileURLToPath","assetNames","assetDirectory","URL","url","contentTypes","shipfoxClientManifest","config","assetPath","name","assertNoPublicAssetConflicts","publicDirectory","publicDir","conflicts","Promise","all","map","publicAsset","undefined","then","catch","filter","length","Error","join","configResolved","resolvedConfig","buildStart","command","emitFile","type","fileName","source","configureServer","server","middlewares","use","request","response","next","find","assetName","split","content","setHeader","end","error","transformIndexHtml","order","handler","tag","children","injectTo","attrs","rel","href","sizes"],"mappings":"AAAA,SAAQA,MAAM,EAAEC,QAAQ,QAAO,mBAAmB;AAClD,SAAQC,OAAO,EAAEC,OAAO,QAAO,YAAY;AAC3C,SAAQC,aAAa,QAAO,WAAW;AAGvC,MAAMC,aAAa;IACjB;IACA;IACA;IACA;IACA;IACA;IACA;IACA,8EAA8E;IAC9E,kDAAkD;IAClD;CACD;AAED,MAAMC,iBAAiBF,cAAc,IAAIG,IAAI,iBAAiB,YAAYC,GAAG;AAE7E,MAAMC,eAAuC;IAC3C,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,gBAAgB;AAClB;AAEA,OAAO,SAASC;IACd,IAAIC;IAEJ,SAASC,UAAUC,IAAiC;QAClD,OAAOV,QAAQG,gBAAgBO;IACjC;IAEA,eAAeC;QACb,MAAMC,kBAAkBJ,QAAQK;QAChC,IAAI,CAACD,iBAAiB;QACtB,MAAME,YAAY,AAChB,CAAA,MAAMC,QAAQC,GAAG,CACfd,WAAWe,GAAG,CAAC,CAACP;YACd,MAAMQ,cAAclB,QAAQY,iBAAiBF;YAC7C,IAAIQ,gBAAgBT,UAAUC,OAAO,OAAOS;YAC5C,OAAOtB,OAAOqB,aACXE,IAAI,CAAC,IAAMV,MACXW,KAAK,CAAC,IAAM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;oBACA;wBACEF,KAAK;wBACLG,OAAO;4BAACC,KAAK;4BAAQxB,MAAM;4BAAiByB,MAAM;wBAAc;wBAChEH,UAAU;oBACZ;oBACA;wBAACF,KAAK;wBAAQG,OAAO;4BAACC,KAAK;4BAAiBC,MAAM;wBAAc;wBAAGH,UAAU;oBAAM;oBACnF;wBACEF,KAAK;wBACLG,OAAO;4BAACC,KAAK;4BAAoBE,OAAO;4BAAWD,MAAM;wBAAuB;wBAChFH,UAAU;oBACZ;oBACA;wBAACF,KAAK;wBAAQG,OAAO;4BAACC,KAAK;4BAAYC,MAAM;wBAAmB;wBAAGH,UAAU;oBAAM;oBACnF;wBACEF,KAAK;wBACLG,OAAO;4BAAC5C,MAAM;4BAA8BkC,SAAS;wBAAS;wBAC9DS,UAAU;oBACZ;oBACA;wBAACF,KAAK;wBAAQG,OAAO;4BAAC5C,MAAM;4BAAekC,SAAS;wBAAS;wBAAGS,UAAU;oBAAM;iBACjF;YACH;QACF;IACF;AACF"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shipfox/client-shell",
3
3
  "license": "MIT",
4
- "version": "8.0.0",
4
+ "version": "10.0.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ShipfoxHQ/shipfox.git",
@@ -38,8 +38,8 @@
38
38
  "@tanstack/router-core": "^1.171.13",
39
39
  "tsx": "^4.22.4",
40
40
  "framer-motion": "^12.23.24",
41
- "@shipfox/api-auth-dto": "9.0.2",
42
- "@shipfox/api-workspaces-dto": "9.0.2",
41
+ "@shipfox/api-auth-dto": "9.2.0",
42
+ "@shipfox/api-workspaces-dto": "9.2.0",
43
43
  "@shipfox/client-api": "6.0.1",
44
44
  "@shipfox/client-config": "6.0.2",
45
45
  "@shipfox/client-ui": "6.0.2",