autosolutions-os 0.1.0 → 0.2.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.
package/dist/server.js CHANGED
@@ -8,8 +8,8 @@
8
8
  * project accepts.
9
9
  */
10
10
  import { createClient } from "@supabase/supabase-js";
11
- import { corePublishableKey, coreProjectRef, coreUrl } from "./config";
12
- import { joinChunks, sharedSessionCookieName } from "./session";
11
+ import { corePublishableKey, coreProjectRef, coreUrl } from "./config.js";
12
+ import { joinChunks, sharedSessionCookieName } from "./session.js";
13
13
  function clientForToken(token, schema) {
14
14
  return createClient(coreUrl(), corePublishableKey(), {
15
15
  ...(schema ? { db: { schema } } : {}),
package/dist/session.js CHANGED
@@ -18,7 +18,7 @@
18
18
  * cold load, so opening the hub in a fresh tab silently signed the user out of
19
19
  * every other app.
20
20
  */
21
- import { PARENT_DOMAIN } from "./config";
21
+ import { PARENT_DOMAIN } from "./config.js";
22
22
  /** Cookies cap around 4KB each, and sessions can exceed that, so they chunk. */
23
23
  const CHUNK = 3200;
24
24
  const MAX_CHUNKS = 8;
package/dist/url.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ /**
2
+ * URL helpers with no dependencies, so `autosolutions-os/nav` can use them
3
+ * without pulling React or Supabase into an app's bundle.
4
+ */
5
+ /**
6
+ * Apps show the acting company's branding, so a link carries it as a hint.
7
+ * Access is still decided by the core; this only saves a round trip.
8
+ */
9
+ export declare function withTenantHint(url: string, slug: string | null): string;
package/dist/url.js ADDED
@@ -0,0 +1,20 @@
1
+ /**
2
+ * URL helpers with no dependencies, so `autosolutions-os/nav` can use them
3
+ * without pulling React or Supabase into an app's bundle.
4
+ */
5
+ /**
6
+ * Apps show the acting company's branding, so a link carries it as a hint.
7
+ * Access is still decided by the core; this only saves a round trip.
8
+ */
9
+ export function withTenantHint(url, slug) {
10
+ if (!slug)
11
+ return url;
12
+ try {
13
+ const parsed = new URL(url);
14
+ parsed.searchParams.set("tenant", slug);
15
+ return parsed.toString();
16
+ }
17
+ catch {
18
+ return url;
19
+ }
20
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autosolutions-os",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "One sign-in, one company switcher, one app grid. What every AutoSolutions app imports instead of copying.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
@@ -9,18 +9,23 @@
9
9
  "exports": {
10
10
  ".": { "types": "./dist/index.d.ts", "import": "./dist/index.js" },
11
11
  "./server": { "types": "./dist/server.d.ts", "import": "./dist/server.js" },
12
+ "./nav": { "types": "./dist/nav.d.ts", "import": "./dist/nav.js" },
13
+ "./frame": { "types": "./dist/frame.d.ts", "import": "./dist/frame.js" },
12
14
  "./chrome.css": "./dist/chrome.css"
13
15
  },
14
- "files": ["dist"],
16
+ "files": ["dist", "CHANGELOG.md"],
15
17
  "scripts": {
16
18
  "build": "tsc -p tsconfig.build.json && cp src/chrome.css dist/chrome.css",
17
- "typecheck": "tsc --noEmit"
19
+ "typecheck": "tsc --noEmit",
20
+ "test": "bun test"
18
21
  },
19
22
  "peerDependencies": {
20
23
  "@supabase/supabase-js": ">=2.40.0",
24
+ "autosolutions-design-system": ">=6.3.0 <7",
21
25
  "react": ">=18"
22
26
  },
23
27
  "peerDependenciesMeta": {
28
+ "autosolutions-design-system": { "optional": true },
24
29
  "react": { "optional": true }
25
30
  },
26
31
  "devDependencies": {