@atlasauth/pca-connectors 0.0.0-stage → 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.
@@ -0,0 +1,260 @@
1
+ "use strict";
2
+ /**
3
+ * The seeded connector catalog: declarative {@link ProviderManifest}s for the top outbound SaaS tools.
4
+ *
5
+ * These carry NO secrets — only public OAuth 2.0 endpoints, the scopes a provider offers, how its token is
6
+ * presented, and its refresh contract. A consumer supplies the `clientId` / `clientSecret` at call time.
7
+ * Endpoints and scope strings are the providers' documented production values; `defaultScopes` is a
8
+ * least-privilege starting set, always a subset of `scopesAvailable`.
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.BUILTIN_MANIFESTS = exports.airtable = exports.dropbox = exports.stripe = exports.zoom = exports.linear = exports.snowflake = exports.shopify = exports.microsoft = exports.salesforce = exports.atlassian = exports.hubspot = exports.notion = exports.slack = exports.github = exports.google = void 0;
12
+ /** Google Workspace / Gmail / Drive / Calendar. PKCE-capable; `access_type=offline` is required for a refresh token. */
13
+ exports.google = {
14
+ id: 'google',
15
+ displayName: 'Google Workspace',
16
+ authorizeUrl: 'https://accounts.google.com/o/oauth2/v2/auth',
17
+ tokenUrl: 'https://oauth2.googleapis.com/token',
18
+ scopesAvailable: [
19
+ 'openid',
20
+ 'email',
21
+ 'profile',
22
+ 'https://www.googleapis.com/auth/gmail.readonly',
23
+ 'https://www.googleapis.com/auth/gmail.send',
24
+ 'https://www.googleapis.com/auth/drive.readonly',
25
+ 'https://www.googleapis.com/auth/calendar',
26
+ ],
27
+ defaultScopes: ['openid', 'email', 'profile'],
28
+ refresh: { mode: 'refresh_token', supportsScopeNarrowing: false },
29
+ tokenPlacement: 'bearer',
30
+ pkce: true,
31
+ authParams: { access_type: 'offline', prompt: 'consent' },
32
+ docsUrl: 'https://developers.google.com/identity/protocols/oauth2',
33
+ };
34
+ /** GitHub OAuth (classic app). Tokens are long-lived and do not refresh. Authorize scopes are space-delimited. */
35
+ exports.github = {
36
+ id: 'github',
37
+ displayName: 'GitHub',
38
+ authorizeUrl: 'https://github.com/login/oauth/authorize',
39
+ tokenUrl: 'https://github.com/login/oauth/access_token',
40
+ scopesAvailable: ['repo', 'read:user', 'user:email', 'read:org', 'gist', 'workflow'],
41
+ defaultScopes: ['read:user', 'user:email'],
42
+ refresh: { mode: 'none' },
43
+ tokenPlacement: 'bearer',
44
+ pkce: false,
45
+ docsUrl: 'https://docs.github.com/apps/oauth-apps',
46
+ };
47
+ /** Slack (OAuth v2). Bot tokens are long-lived; scopes are COMMA-delimited. */
48
+ exports.slack = {
49
+ id: 'slack',
50
+ displayName: 'Slack',
51
+ authorizeUrl: 'https://slack.com/oauth/v2/authorize',
52
+ tokenUrl: 'https://slack.com/api/oauth.v2.access',
53
+ scopesAvailable: ['chat:write', 'channels:read', 'channels:history', 'users:read', 'files:read'],
54
+ defaultScopes: ['chat:write', 'channels:read'],
55
+ refresh: { mode: 'none' },
56
+ tokenPlacement: 'bearer',
57
+ pkce: false,
58
+ scopeSeparator: ',',
59
+ docsUrl: 'https://api.slack.com/authentication/oauth-v2',
60
+ };
61
+ /** Notion. Scopes are integration-level (none in the request); client credentials go via HTTP Basic. */
62
+ exports.notion = {
63
+ id: 'notion',
64
+ displayName: 'Notion',
65
+ authorizeUrl: 'https://api.notion.com/v1/oauth/authorize',
66
+ tokenUrl: 'https://api.notion.com/v1/oauth/token',
67
+ scopesAvailable: [],
68
+ defaultScopes: [],
69
+ refresh: { mode: 'none' },
70
+ tokenPlacement: 'bearer',
71
+ pkce: false,
72
+ clientAuth: 'basic',
73
+ authParams: { owner: 'user' },
74
+ docsUrl: 'https://developers.notion.com/docs/authorization',
75
+ };
76
+ /** HubSpot CRM. Supports the refresh-token grant. */
77
+ exports.hubspot = {
78
+ id: 'hubspot',
79
+ displayName: 'HubSpot',
80
+ authorizeUrl: 'https://app.hubspot.com/oauth/authorize',
81
+ tokenUrl: 'https://api.hubapi.com/oauth/v1/token',
82
+ scopesAvailable: [
83
+ 'oauth',
84
+ 'crm.objects.contacts.read',
85
+ 'crm.objects.contacts.write',
86
+ 'crm.objects.deals.read',
87
+ 'crm.objects.deals.write',
88
+ ],
89
+ defaultScopes: ['oauth', 'crm.objects.contacts.read'],
90
+ refresh: { mode: 'refresh_token' },
91
+ tokenPlacement: 'bearer',
92
+ pkce: false,
93
+ docsUrl: 'https://developers.hubspot.com/docs/api/oauth-quickstart-guide',
94
+ };
95
+ /** Atlassian (Jira / Confluence). PKCE + `offline_access` for refresh; `audience` names the API. */
96
+ exports.atlassian = {
97
+ id: 'atlassian',
98
+ displayName: 'Atlassian (Jira)',
99
+ authorizeUrl: 'https://auth.atlassian.com/authorize',
100
+ tokenUrl: 'https://auth.atlassian.com/oauth/token',
101
+ scopesAvailable: ['read:jira-work', 'write:jira-work', 'read:jira-user', 'manage:jira-project', 'offline_access'],
102
+ defaultScopes: ['read:jira-work', 'offline_access'],
103
+ refresh: { mode: 'refresh_token' },
104
+ tokenPlacement: 'bearer',
105
+ pkce: true,
106
+ authParams: { audience: 'api.atlassian.com', prompt: 'consent' },
107
+ docsUrl: 'https://developer.atlassian.com/cloud/jira/platform/oauth-2-3lo-apps/',
108
+ };
109
+ /** Salesforce. Refresh-token grant; `refresh_token`/`offline_access` scopes enable it. */
110
+ exports.salesforce = {
111
+ id: 'salesforce',
112
+ displayName: 'Salesforce',
113
+ authorizeUrl: 'https://login.salesforce.com/services/oauth2/authorize',
114
+ tokenUrl: 'https://login.salesforce.com/services/oauth2/token',
115
+ scopesAvailable: ['api', 'refresh_token', 'offline_access', 'full', 'chatter_api', 'openid'],
116
+ defaultScopes: ['api', 'refresh_token'],
117
+ refresh: { mode: 'refresh_token' },
118
+ tokenPlacement: 'bearer',
119
+ pkce: true,
120
+ docsUrl: 'https://help.salesforce.com/s/articleView?id=sf.remoteaccess_oauth_web_server_flow.htm',
121
+ };
122
+ /** Microsoft Graph (identity platform v2). `offline_access` yields a refresh token. */
123
+ exports.microsoft = {
124
+ id: 'microsoft',
125
+ displayName: 'Microsoft Graph',
126
+ authorizeUrl: 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize',
127
+ tokenUrl: 'https://login.microsoftonline.com/common/oauth2/v2.0/token',
128
+ scopesAvailable: [
129
+ 'openid',
130
+ 'profile',
131
+ 'offline_access',
132
+ 'User.Read',
133
+ 'Mail.Read',
134
+ 'Mail.Send',
135
+ 'Files.Read',
136
+ 'Calendars.Read',
137
+ ],
138
+ defaultScopes: ['openid', 'profile', 'offline_access', 'User.Read'],
139
+ refresh: { mode: 'refresh_token' },
140
+ tokenPlacement: 'bearer',
141
+ pkce: true,
142
+ docsUrl: 'https://learn.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow',
143
+ };
144
+ /** Shopify Admin. Per-shop host via the `{shop}` placeholder; scopes are COMMA-delimited. */
145
+ exports.shopify = {
146
+ id: 'shopify',
147
+ displayName: 'Shopify',
148
+ authorizeUrl: 'https://{shop}.myshopify.com/admin/oauth/authorize',
149
+ tokenUrl: 'https://{shop}.myshopify.com/admin/oauth/access_token',
150
+ scopesAvailable: ['read_products', 'write_products', 'read_orders', 'write_orders', 'read_customers'],
151
+ defaultScopes: ['read_products', 'read_orders'],
152
+ refresh: { mode: 'none' },
153
+ tokenPlacement: 'header',
154
+ headerName: 'X-Shopify-Access-Token',
155
+ pkce: false,
156
+ scopeSeparator: ',',
157
+ requiredVars: ['shop'],
158
+ docsUrl: 'https://shopify.dev/docs/apps/auth/oauth',
159
+ };
160
+ /** Snowflake (OAuth). Per-account host via the `{account}` placeholder; refresh-token grant. */
161
+ exports.snowflake = {
162
+ id: 'snowflake',
163
+ displayName: 'Snowflake',
164
+ authorizeUrl: 'https://{account}.snowflakecomputing.com/oauth/authorize',
165
+ tokenUrl: 'https://{account}.snowflakecomputing.com/oauth/token-request',
166
+ scopesAvailable: ['refresh_token', 'session:role-any'],
167
+ defaultScopes: ['refresh_token'],
168
+ refresh: { mode: 'refresh_token' },
169
+ tokenPlacement: 'bearer',
170
+ pkce: true,
171
+ requiredVars: ['account'],
172
+ docsUrl: 'https://docs.snowflake.com/en/user-guide/oauth-custom',
173
+ };
174
+ /** Linear. Long-lived tokens (no refresh); scopes are COMMA-delimited. */
175
+ exports.linear = {
176
+ id: 'linear',
177
+ displayName: 'Linear',
178
+ authorizeUrl: 'https://linear.app/oauth/authorize',
179
+ tokenUrl: 'https://api.linear.app/oauth/token',
180
+ scopesAvailable: ['read', 'write', 'issues:create', 'admin'],
181
+ defaultScopes: ['read'],
182
+ refresh: { mode: 'none' },
183
+ tokenPlacement: 'bearer',
184
+ pkce: false,
185
+ scopeSeparator: ',',
186
+ docsUrl: 'https://developers.linear.app/docs/oauth/authentication',
187
+ };
188
+ /** Zoom. Access tokens expire hourly; refresh-token grant with HTTP Basic client auth. */
189
+ exports.zoom = {
190
+ id: 'zoom',
191
+ displayName: 'Zoom',
192
+ authorizeUrl: 'https://zoom.us/oauth/authorize',
193
+ tokenUrl: 'https://zoom.us/oauth/token',
194
+ scopesAvailable: ['meeting:read', 'meeting:write', 'user:read', 'recording:read'],
195
+ defaultScopes: ['user:read'],
196
+ refresh: { mode: 'refresh_token' },
197
+ tokenPlacement: 'bearer',
198
+ pkce: true,
199
+ clientAuth: 'basic',
200
+ docsUrl: 'https://developers.zoom.us/docs/integrations/oauth/',
201
+ };
202
+ /** Stripe Connect (OAuth). Refresh-token grant; `read_only` is least-privilege. */
203
+ exports.stripe = {
204
+ id: 'stripe',
205
+ displayName: 'Stripe',
206
+ authorizeUrl: 'https://connect.stripe.com/oauth/authorize',
207
+ tokenUrl: 'https://connect.stripe.com/oauth/token',
208
+ scopesAvailable: ['read_only', 'read_write'],
209
+ defaultScopes: ['read_only'],
210
+ refresh: { mode: 'refresh_token' },
211
+ tokenPlacement: 'bearer',
212
+ pkce: false,
213
+ docsUrl: 'https://stripe.com/docs/connect/oauth-reference',
214
+ };
215
+ /** Dropbox. `token_access_type=offline` yields a refresh token; PKCE-capable. */
216
+ exports.dropbox = {
217
+ id: 'dropbox',
218
+ displayName: 'Dropbox',
219
+ authorizeUrl: 'https://www.dropbox.com/oauth2/authorize',
220
+ tokenUrl: 'https://api.dropboxapi.com/oauth2/token',
221
+ scopesAvailable: ['files.content.read', 'files.content.write', 'files.metadata.read', 'sharing.read'],
222
+ defaultScopes: ['files.metadata.read'],
223
+ refresh: { mode: 'refresh_token' },
224
+ tokenPlacement: 'bearer',
225
+ pkce: true,
226
+ authParams: { token_access_type: 'offline' },
227
+ docsUrl: 'https://developers.dropbox.com/oauth-guide',
228
+ };
229
+ /** Airtable. PKCE is REQUIRED; refresh-token grant. */
230
+ exports.airtable = {
231
+ id: 'airtable',
232
+ displayName: 'Airtable',
233
+ authorizeUrl: 'https://airtable.com/oauth2/v1/authorize',
234
+ tokenUrl: 'https://airtable.com/oauth2/v1/token',
235
+ scopesAvailable: ['data.records:read', 'data.records:write', 'schema.bases:read', 'schema.bases:write'],
236
+ defaultScopes: ['data.records:read'],
237
+ refresh: { mode: 'refresh_token', supportsScopeNarrowing: false },
238
+ tokenPlacement: 'bearer',
239
+ pkce: true,
240
+ docsUrl: 'https://airtable.com/developers/web/guides/oauth-integrations',
241
+ };
242
+ /** The full seeded catalog, in a stable order. */
243
+ exports.BUILTIN_MANIFESTS = [
244
+ exports.google,
245
+ exports.github,
246
+ exports.slack,
247
+ exports.notion,
248
+ exports.hubspot,
249
+ exports.atlassian,
250
+ exports.salesforce,
251
+ exports.microsoft,
252
+ exports.shopify,
253
+ exports.snowflake,
254
+ exports.linear,
255
+ exports.zoom,
256
+ exports.stripe,
257
+ exports.dropbox,
258
+ exports.airtable,
259
+ ];
260
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAIH,wHAAwH;AAC3G,QAAA,MAAM,GAAqB;IACtC,EAAE,EAAE,QAAQ;IACZ,WAAW,E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;IACxC,EAAE,EAAE,UAAU;IACd,WAAW,EAAE,UAAU;IACvB,YAAY,EAAE,0CAA0C;IACxD,QAAQ,EAAE,sCAAsC;IAChD,eAAe,EAAE,CAAC,mBAAmB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,oBAAoB,CAAC;IACvG,aAAa,EAAE,CAAC,mBAAmB,CAAC;IACpC,OAAO,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,sBAAsB,EAAE,KAAK,EAAE;IACjE,cAAc,EAAE,QAAQ;IACxB,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,+DAA+D;CACzE,CAAC;AAEF,kDAAkD;AACrC,QAAA,iBAAiB,GAAgC;IAC5D,cAAM;IACN,cAAM;IACN,aAAK;IACL,cAAM;IACN,eAAO;IACP,iBAAS;IACT,kBAAU;IACV,iBAAS;IACT,eAAO;IACP,iBAAS;IACT,cAAM;IACN,YAAI;IACJ,cAAM;IACN,eAAO;IACP,gBAAQ;CACT,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * The connector registry: an in-memory map of provider id → {@link ProviderManifest}. A manifest is
3
+ * validated on the way in, so nothing malformed can ever be looked up. A process-wide {@link defaultRegistry}
4
+ * is seeded with the built-in catalog; callers who want isolation build their own with {@link createDefaultRegistry}.
5
+ */
6
+ import { type ProviderManifest } from './manifest';
7
+ /** A mutable collection of provider manifests, keyed by id. */
8
+ export declare class ProviderRegistry {
9
+ private readonly byId;
10
+ /** Validate and register (or replace) a manifest. Throws `ManifestValidationError` on a malformed input. */
11
+ register(manifest: ProviderManifest | unknown): ProviderManifest;
12
+ /** The manifest for `id`, or `undefined` when none is registered. */
13
+ get(id: string): ProviderManifest | undefined;
14
+ /** The manifest for `id`, or throw {@link UnknownProviderError}. */
15
+ require(id: string): ProviderManifest;
16
+ /** Whether a manifest is registered for `id`. */
17
+ has(id: string): boolean;
18
+ /** Every registered manifest, in ascending id order. */
19
+ list(): ProviderManifest[];
20
+ /** The registered provider ids, in ascending order. */
21
+ ids(): string[];
22
+ }
23
+ /** A fresh registry seeded with the full built-in connector catalog. */
24
+ export declare function createDefaultRegistry(): ProviderRegistry;
25
+ /** The process-wide registry the top-level `registerProvider` / `getProvider` / `listProviders` operate on. */
26
+ export declare const defaultRegistry: ProviderRegistry;
27
+ /** Validate and register a custom manifest onto the {@link defaultRegistry}. */
28
+ export declare function registerProvider(manifest: ProviderManifest | unknown): ProviderManifest;
29
+ /** The manifest for `id` in the {@link defaultRegistry}, or `undefined`. */
30
+ export declare function getProvider(id: string): ProviderManifest | undefined;
31
+ /** Every manifest in the {@link defaultRegistry}, in ascending id order. */
32
+ export declare function listProviders(): ProviderManifest[];
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ /**
3
+ * The connector registry: an in-memory map of provider id → {@link ProviderManifest}. A manifest is
4
+ * validated on the way in, so nothing malformed can ever be looked up. A process-wide {@link defaultRegistry}
5
+ * is seeded with the built-in catalog; callers who want isolation build their own with {@link createDefaultRegistry}.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.defaultRegistry = exports.ProviderRegistry = void 0;
9
+ exports.createDefaultRegistry = createDefaultRegistry;
10
+ exports.registerProvider = registerProvider;
11
+ exports.getProvider = getProvider;
12
+ exports.listProviders = listProviders;
13
+ const manifest_1 = require("./manifest");
14
+ const providers_1 = require("./providers");
15
+ /** A mutable collection of provider manifests, keyed by id. */
16
+ class ProviderRegistry {
17
+ byId = new Map();
18
+ /** Validate and register (or replace) a manifest. Throws `ManifestValidationError` on a malformed input. */
19
+ register(manifest) {
20
+ const valid = (0, manifest_1.assertManifest)(manifest);
21
+ this.byId.set(valid.id, valid);
22
+ return valid;
23
+ }
24
+ /** The manifest for `id`, or `undefined` when none is registered. */
25
+ get(id) {
26
+ return this.byId.get(id);
27
+ }
28
+ /** The manifest for `id`, or throw {@link UnknownProviderError}. */
29
+ require(id) {
30
+ const m = this.byId.get(id);
31
+ if (m === undefined)
32
+ throw new manifest_1.UnknownProviderError(id);
33
+ return m;
34
+ }
35
+ /** Whether a manifest is registered for `id`. */
36
+ has(id) {
37
+ return this.byId.has(id);
38
+ }
39
+ /** Every registered manifest, in ascending id order. */
40
+ list() {
41
+ return [...this.byId.values()].sort((a, b) => (a.id < b.id ? -1 : a.id > b.id ? 1 : 0));
42
+ }
43
+ /** The registered provider ids, in ascending order. */
44
+ ids() {
45
+ return this.list().map((m) => m.id);
46
+ }
47
+ }
48
+ exports.ProviderRegistry = ProviderRegistry;
49
+ /** A fresh registry seeded with the full built-in connector catalog. */
50
+ function createDefaultRegistry() {
51
+ const r = new ProviderRegistry();
52
+ for (const m of providers_1.BUILTIN_MANIFESTS)
53
+ r.register(m);
54
+ return r;
55
+ }
56
+ /** The process-wide registry the top-level `registerProvider` / `getProvider` / `listProviders` operate on. */
57
+ exports.defaultRegistry = createDefaultRegistry();
58
+ /** Validate and register a custom manifest onto the {@link defaultRegistry}. */
59
+ function registerProvider(manifest) {
60
+ return exports.defaultRegistry.register(manifest);
61
+ }
62
+ /** The manifest for `id` in the {@link defaultRegistry}, or `undefined`. */
63
+ function getProvider(id) {
64
+ return exports.defaultRegistry.get(id);
65
+ }
66
+ /** Every manifest in the {@link defaultRegistry}, in ascending id order. */
67
+ function listProviders() {
68
+ return exports.defaultRegistry.list();
69
+ }
70
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AA6CH,sDAIC;AAMD,4CAEC;AAGD,kCAEC;AAGD,sCAEC;AAjED,yCAAyF;AACzF,2CAAgD;AAEhD,+DAA+D;AAC/D,MAAa,gBAAgB;IACV,IAAI,GAAG,IAAI,GAAG,EAA4B,CAAC;IAE5D,4GAA4G;IAC5G,QAAQ,CAAC,QAAoC;QAC3C,MAAM,KAAK,GAAG,IAAA,yBAAc,EAAC,QAAQ,CAAC,CAAC;QACvC,IAAI,CAAC,IAAI,CAAC,GAAG,CA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,CAAC,CAAC,CAAC,CAAC;IACjD,OAAO,CAAC,CAAC;AACX,CAAC;AAED,+GAA+G;AAClG,QAAA,eAAe,GAAqB,qBAAqB,EAAE,CAAC;AAEzE,gFAAgF;AAChF,SAAgB,gBAAgB,CAAC,QAAoC;IACnE,OAAO,uBAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC5C,CAAC;AAED,4EAA4E;AAC5E,SAAgB,WAAW,CAAC,EAAU;IACpC,OAAO,uBAAe,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AACjC,CAAC;AAED,4EAA4E;AAC5E,SAAgB,aAAa;IAC3B,OAAO,uBAAe,CAAC,IAAI,EAAE,CAAC;AAChC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,58 @@
1
1
  {
2
2
  "name": "@atlasauth/pca-connectors",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.2.0",
4
+ "description": "Declarative outbound connector registry for PCA: provider manifests (auth URLs, scopes, refresh, token placement) for the top SaaS tools + an auto-refresh helper, so every vault connector call is a proof-carrying capability.",
5
+ "keywords": [
6
+ "connectors",
7
+ "oauth",
8
+ "saas",
9
+ "manifest",
10
+ "agent authorization",
11
+ "proof-carrying authority",
12
+ "pca",
13
+ "ai agents"
14
+ ],
15
+ "license": "MIT",
16
+ "homepage": "https://github.com/Atlas-Authorization/pca#readme",
17
+ "bugs": {
18
+ "url": "https://github.com/Atlas-Authorization/pca/issues"
19
+ },
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/Atlas-Authorization/pca.git",
23
+ "directory": "packages/pca-connectors"
24
+ },
25
+ "main": "./dist/index.js",
26
+ "types": "./dist/index.d.ts",
27
+ "exports": {
28
+ ".": {
29
+ "types": "./dist/index.d.ts",
30
+ "default": "./dist/index.js"
31
+ },
32
+ "./package.json": "./package.json"
33
+ },
34
+ "dependencies": {
35
+ "@atlasauth/pca": "0.2.0",
36
+ "@atlasauth/pca-connect": "0.2.0"
37
+ },
38
+ "devDependencies": {
39
+ "typescript": "^5.6.3",
40
+ "vitest": "^2.1.4"
41
+ },
42
+ "files": [
43
+ "dist",
44
+ "README.md",
45
+ "LICENSE"
46
+ ],
47
+ "engines": {
48
+ "node": ">=20"
49
+ },
50
+ "publishConfig": {
51
+ "access": "public"
52
+ },
53
+ "scripts": {
54
+ "build": "tsc -p tsconfig.build.json",
55
+ "typecheck": "tsc -p tsconfig.json --noEmit",
56
+ "test": "vitest run"
57
+ }
6
58
  }