@assembly-js/app-foundation 0.0.1-rc.1 → 0.0.1-rc.2

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,4 +1,4 @@
1
- import { getAssembly } from './assembly';
1
+ import { getAssembly } from './assembly.js';
2
2
  // fileName must be a bare file name (e.g. 'invoice.pdf'), never a path:
3
3
  // the platform rejects any value containing '/' or '..'. Do NOT prefix
4
4
  // folders or construct the S3 key yourself — the platform scopes the key
@@ -1,6 +1,6 @@
1
1
  import { type AssemblyAPI } from '@assembly-js/node-sdk';
2
2
  import { NextRequest, NextResponse } from 'next/server';
3
- import { type ExchangedSession } from './session-exchange';
3
+ import { type ExchangedSession } from './session-exchange.js';
4
4
  type AssemblyInput = {
5
5
  token?: string;
6
6
  } | string | undefined;
package/dist/assembly.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { assemblyApi } from '@assembly-js/node-sdk';
2
2
  import { cookies, headers } from 'next/headers';
3
3
  import { NextResponse } from 'next/server';
4
- import { BEARER_COOKIE_NAME, BEARER_HEADER_NAME, decodeBearer, isSessionExchangeEnabled, } from './session-exchange';
5
- import { mintBearerFromAppKey } from './mint-bearer';
4
+ import { BEARER_COOKIE_NAME, BEARER_HEADER_NAME, decodeBearer, isSessionExchangeEnabled, } from './session-exchange.js';
5
+ import { mintBearerFromAppKey } from './mint-bearer.js';
6
6
  // Trusted API origin for this stack, supplied by the build environment — NOT by
7
7
  // a token claim. Empty in prod/shared-staging (the SDK's env default is already
8
8
  // correct); set to a per-dev private stack's platform-api URL otherwise. Passed
package/dist/auth.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { NextResponse } from 'next/server';
2
- import { getAssembly } from './assembly';
3
- import { BEARER_COOKIE_NAME, BEARER_HEADER_NAME, decodeBearer, isSessionExchangeEnabled, } from './session-exchange';
2
+ import { getAssembly } from './assembly.js';
3
+ import { BEARER_COOKIE_NAME, BEARER_HEADER_NAME, decodeBearer, isSessionExchangeEnabled, } from './session-exchange.js';
4
4
  // Detect an expired/undecryptable-token error from the SDK by shape rather than
5
5
  // by importing a concrete class — the foundation builds against whatever SDK
6
6
  // version is published, which may not export the error type.
package/dist/client.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export * from './session-exchange';
2
- export * from './network-capture';
3
- export * from './client-companies';
4
- export * from './theme';
5
- export * from './resource-resolution';
1
+ export * from './session-exchange.js';
2
+ export * from './network-capture.js';
3
+ export * from './client-companies.js';
4
+ export * from './theme.js';
5
+ export * from './resource-resolution.js';
package/dist/client.js CHANGED
@@ -5,13 +5,13 @@
5
5
  // string compare against a build-time-inlined flag rather than a secret, and its
6
6
  // JWT decode is written on Web APIs only (atob/TextDecoder) so the same module
7
7
  // also runs in the Edge middleware runtime that proxy.ts uses.
8
- export * from './session-exchange';
9
- export * from './network-capture';
10
- export * from './client-companies';
11
- export * from './theme';
8
+ export * from './session-exchange.js';
9
+ export * from './network-capture.js';
10
+ export * from './client-companies.js';
11
+ export * from './theme.js';
12
12
  // Pure data-shaping over resolver responses — no imports, no secrets, no
13
13
  // next/headers. It lives here rather than in ./server because <ResourcePicker>
14
14
  // is a 'use client' component: today it imports only the types, which are erased
15
15
  // at compile time, but a value import from ./server would trip the server-only
16
16
  // guard for no reason.
17
- export * from './resource-resolution';
17
+ export * from './resource-resolution.js';
@@ -1,4 +1,4 @@
1
- import { type ExchangedSession, type MintFailure } from './session-exchange';
1
+ import { type ExchangedSession, type MintFailure } from './session-exchange.js';
2
2
  export interface MintedBearer {
3
3
  bearer: string;
4
4
  bearerExpiresAt: number;
@@ -1,5 +1,5 @@
1
1
  import { assemblyApi, OpenAPI } from '@assembly-js/node-sdk';
2
- import { BEARER_TTL_MS, classifyExchangeFailure, } from './session-exchange';
2
+ import { BEARER_TTL_MS, classifyExchangeFailure, } from './session-exchange.js';
3
3
  // Trusted API origin for this stack (build-env supplied); empty in prod where
4
4
  // the SDK default is correct.
5
5
  const mintBaseUrl = process.env.ASSEMBLY_API_BASE_URL || undefined;
package/dist/nango.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type ResourceFieldMap, type ResourcePage } from './resource-resolution';
1
+ import { type ResourceFieldMap, type ResourcePage } from './resource-resolution.js';
2
2
  export type Provider = 'slack' | 'gmail' | 'google-calendar' | 'google-drive' | 'google-sheet' | 'hubspot' | 'salesforce' | 'notion' | 'linear' | 'stripe' | 'github';
3
3
  export type ConnectorErrorCode = 'app_key_required' | 'provider_not_declared' | 'connection_required' | 'needs_reauth' | 'needs_reauth_scope' | 'connection_throttled' | 'connector_unavailable' | 'action_failed' | 'invalid_request';
4
4
  export interface ConnectionStatus {
package/dist/nango.js CHANGED
@@ -1,5 +1,5 @@
1
- import { getAssembly } from './assembly';
2
- import { findResource, normalizeResourcePage, TtlCache, } from './resource-resolution';
1
+ import { getAssembly } from './assembly.js';
2
+ import { findResource, normalizeResourcePage, TtlCache, } from './resource-resolution.js';
3
3
  // Thrown when the broker returns a structured `{ error, provider }` fail-closed
4
4
  // response. Catch it server-side and branch on `code` to render the right empty
5
5
  // state (e.g. "reconnect required" for needs_reauth, "not configured" for
package/dist/params.js CHANGED
@@ -1,4 +1,4 @@
1
- import { badRequest } from './api-errors';
1
+ import { badRequest } from './api-errors.js';
2
2
  // RFC 4122 UUID. Call before passing a value into a uuid-typed Drizzle column —
3
3
  // Postgres throws on bad syntax and route handlers must not leak that string.
4
4
  const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
package/dist/server.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import 'server-only';
2
- export * from './assembly';
3
- export * from './auth';
4
- export * from './mint-bearer';
5
- export * from './nango';
6
- export * from './app-storage';
7
- export * from './labels';
8
- export * from './api-errors';
9
- export * from './params';
10
- export * from './client';
2
+ export * from './assembly.js';
3
+ export * from './auth.js';
4
+ export * from './mint-bearer.js';
5
+ export * from './nango.js';
6
+ export * from './app-storage.js';
7
+ export * from './labels.js';
8
+ export * from './api-errors.js';
9
+ export * from './params.js';
10
+ export * from './client.js';
package/dist/server.js CHANGED
@@ -3,18 +3,18 @@
3
3
  // condition) is what makes a client bundle importing them fail at build time
4
4
  // instead of silently shipping ASSEMBLY_API_KEY to the browser.
5
5
  import 'server-only';
6
- export * from './assembly';
7
- export * from './auth';
8
- export * from './mint-bearer';
9
- export * from './nango';
10
- export * from './app-storage';
11
- export * from './labels';
6
+ export * from './assembly.js';
7
+ export * from './auth.js';
8
+ export * from './mint-bearer.js';
9
+ export * from './nango.js';
10
+ export * from './app-storage.js';
11
+ export * from './labels.js';
12
12
  // Returns NextResponse, so route handlers only — but nothing here reads a
13
13
  // secret, which is why a client file may still `import type` from them.
14
- export * from './api-errors';
15
- export * from './params';
14
+ export * from './api-errors.js';
15
+ export * from './params.js';
16
16
  // The client-safe surface is re-exported so a server file needs one import, not
17
17
  // two. Importing './client' rather than the package's own ./client subpath keeps
18
18
  // this a single module graph — a self-import would resolve through node_modules
19
19
  // and duplicate every constant.
20
- export * from './client';
20
+ export * from './client.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@assembly-js/app-foundation",
3
- "version": "0.0.1-rc.1",
3
+ "version": "0.0.1-rc.2",
4
4
  "description": "Versioned foundation helpers and build context for Assembly generated apps",
5
5
  "type": "module",
6
6
  "files": [
@@ -21,7 +21,8 @@
21
21
  "scripts": {
22
22
  "build": "tsc",
23
23
  "test": "bun test",
24
- "prepublishOnly": "npm run build"
24
+ "prepublishOnly": "npm run build && npm run verify:dist",
25
+ "verify:dist": "node scripts/verify-dist-resolves.mjs"
25
26
  },
26
27
  "peerDependencies": {
27
28
  "@assembly-js/node-sdk": ">=4.2.3-beta.2",