naystack 1.7.41 → 1.8.1

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.
Files changed (69) hide show
  1. package/dist/auth/client.cjs.js +2 -2
  2. package/dist/auth/client.esm.js +2 -2
  3. package/dist/auth/email/client.cjs.js +2 -2
  4. package/dist/auth/email/client.esm.js +2 -2
  5. package/dist/auth/email/index.cjs.js +2 -2
  6. package/dist/auth/email/index.esm.js +2 -2
  7. package/dist/auth/email/next.cjs.js +2 -2
  8. package/dist/auth/email/next.esm.js +2 -2
  9. package/dist/auth/email/routes/delete.cjs.js +2 -2
  10. package/dist/auth/email/routes/delete.esm.js +2 -2
  11. package/dist/auth/email/routes/get.cjs.js +2 -2
  12. package/dist/auth/email/routes/get.esm.js +2 -2
  13. package/dist/auth/email/routes/post.cjs.js +2 -2
  14. package/dist/auth/email/routes/post.esm.js +2 -2
  15. package/dist/auth/email/routes/put.cjs.js +2 -2
  16. package/dist/auth/email/routes/put.esm.js +2 -2
  17. package/dist/auth/email/token.cjs.js +2 -2
  18. package/dist/auth/email/token.esm.js +2 -2
  19. package/dist/auth/email/utils.cjs.js +2 -2
  20. package/dist/auth/email/utils.esm.js +2 -2
  21. package/dist/auth/google/get.cjs.js +2 -2
  22. package/dist/auth/google/get.esm.js +2 -2
  23. package/dist/auth/google/index.cjs.js +2 -2
  24. package/dist/auth/google/index.esm.js +2 -2
  25. package/dist/auth/index.cjs.js +9 -5
  26. package/dist/auth/index.esm.js +9 -5
  27. package/dist/auth/instagram/index.cjs.js +9 -5
  28. package/dist/auth/instagram/index.d.mts +4 -1
  29. package/dist/auth/instagram/index.d.ts +4 -1
  30. package/dist/auth/instagram/index.esm.js +9 -5
  31. package/dist/auth/instagram/route.cjs.js +11 -4
  32. package/dist/auth/instagram/route.esm.js +11 -4
  33. package/dist/auth/instagram/utils.cjs.js +3 -3
  34. package/dist/auth/instagram/utils.d.mts +9 -5
  35. package/dist/auth/instagram/utils.d.ts +9 -5
  36. package/dist/auth/instagram/utils.esm.js +3 -3
  37. package/dist/env.cjs.js +3 -3
  38. package/dist/env.d.mts +3 -2
  39. package/dist/env.d.ts +3 -2
  40. package/dist/env.esm.js +3 -3
  41. package/dist/file/client.cjs.js +2 -2
  42. package/dist/file/client.esm.js +2 -2
  43. package/dist/file/index.cjs.js +2 -2
  44. package/dist/file/index.esm.js +2 -2
  45. package/dist/file/put.cjs.js +2 -2
  46. package/dist/file/put.esm.js +2 -2
  47. package/dist/file/setup.cjs.js +2 -2
  48. package/dist/file/setup.esm.js +2 -2
  49. package/dist/file/utils.cjs.js +2 -2
  50. package/dist/file/utils.esm.js +2 -2
  51. package/dist/graphql/client.cjs.js +2 -2
  52. package/dist/graphql/client.esm.js +2 -2
  53. package/dist/graphql/index.cjs.js +27 -11
  54. package/dist/graphql/index.esm.js +27 -11
  55. package/dist/graphql/init.cjs.js +2 -2
  56. package/dist/graphql/init.esm.js +2 -2
  57. package/dist/graphql/next.cjs.js +2 -2
  58. package/dist/graphql/next.esm.js +2 -2
  59. package/dist/graphql/server.cjs.js +2 -2
  60. package/dist/graphql/server.esm.js +2 -2
  61. package/dist/graphql/utils.cjs.js +27 -11
  62. package/dist/graphql/utils.d.mts +40 -8
  63. package/dist/graphql/utils.d.ts +40 -8
  64. package/dist/graphql/utils.esm.js +27 -11
  65. package/dist/utils/client/index.cjs.js +2 -2
  66. package/dist/utils/client/index.esm.js +2 -2
  67. package/dist/utils/client/seo.cjs.js +2 -2
  68. package/dist/utils/client/seo.esm.js +2 -2
  69. package/package.json +1 -1
@@ -26,6 +26,16 @@ type ParsedGQLTypeWithArray<T, MergeNullUndefined extends boolean> = T extends A
26
26
  type ParsedGQLTypeWithNullability<T, IsNullable extends boolean, MergeNullUndefined extends boolean> = IsNullable extends true ? ParsedGQLTypeWithArray<T, MergeNullUndefined> | null | undefined : ParsedGQLTypeWithArray<T, MergeNullUndefined>;
27
27
  /** Allows resolver to return T or Promise<T>. */
28
28
  type Promisify<T> = T | Promise<T>;
29
+ /**
30
+ * Return type of `.authCall()` / `.call()` for a definition.
31
+ *
32
+ * `authorized: true` promises the resolver an `AuthorizedContext` (non-null
33
+ * `userId`). Server-side callers can't be forced to hold a session, so when
34
+ * there's no refresh cookie the only way to keep that promise is to not call the
35
+ * resolver at all — hence the added `null`, which surfaces the logged-out case in
36
+ * the types instead of passing a null `userId` through the cast.
37
+ */
38
+ type AuthCallReturn<IsAuth extends boolean, R> = IsAuth extends true ? Awaited<R> | null : Awaited<R>;
29
39
  /** Base for query/field definition (output, input, options). */
30
40
  interface BaseDefinition<T, U, IsAuth extends boolean = false, OutputNullable extends boolean = false, InputNullable extends boolean = false> {
31
41
  output: T;
@@ -42,10 +52,16 @@ interface BaseDefinition<T, U, IsAuth extends boolean = false, OutputNullable ex
42
52
  */
43
53
  interface QueryDefinition<T, U, IsAuth extends boolean = false, OutputNullable extends boolean = false, InputNullable extends boolean = false, R extends Promisify<ParsedGQLTypeWithNullability<T, OutputNullable, true>> = Promisify<ParsedGQLTypeWithNullability<T, OutputNullable, true>>> extends BaseDefinition<T, U, IsAuth, OutputNullable, InputNullable> {
44
54
  fn: (ctx: IsAuth extends true ? AuthorizedContext : Context, data: ParsedGQLTypeWithNullability<U, InputNullable, false>) => R;
45
- /** Calls the resolver server-side. For authorized queries, reads the refresh cookie; for non-authorized, passes null userId. */
46
- call: (data: ParsedGQLTypeWithNullability<U, InputNullable, false>) => Promise<Awaited<R>>;
47
- /** Calls the resolver server-side with authentication (always reads the refresh cookie). Use in Server Components. */
48
- authCall: (data: ParsedGQLTypeWithNullability<U, InputNullable, false>) => Promise<Awaited<R>>;
55
+ /**
56
+ * Calls the resolver server-side. For authorized queries, reads the refresh cookie; for non-authorized, passes null userId.
57
+ * Resolves to `null` when `authorized: true` and there is no session.
58
+ */
59
+ call: (data: ParsedGQLTypeWithNullability<U, InputNullable, false>) => Promise<AuthCallReturn<IsAuth, R>>;
60
+ /**
61
+ * Calls the resolver server-side with authentication (always reads the refresh cookie). Use in Server Components.
62
+ * Resolves to `null` when `authorized: true` and there is no session — guard it, or gate the page ahead of it.
63
+ */
64
+ authCall: (data: ParsedGQLTypeWithNullability<U, InputNullable, false>) => Promise<AuthCallReturn<IsAuth, R>>;
49
65
  mutation?: boolean;
50
66
  }
51
67
  /**
@@ -109,10 +125,26 @@ declare function resolver<T, U, IsAuth extends boolean = false, OutputNullable e
109
125
  */
110
126
  interface FieldResolverDefinition<T, U, Root, IsAuth extends boolean = false, OutputNullable extends boolean = false, InputNullable extends boolean = false, R extends Promisify<ParsedGQLTypeWithNullability<T, OutputNullable, true>> = Promisify<ParsedGQLTypeWithNullability<T, OutputNullable, true>>> extends BaseDefinition<T, U, IsAuth, OutputNullable, InputNullable> {
111
127
  fn: (root: Root, ctx: IsAuth extends true ? AuthorizedContext : Context, data: ParsedGQLTypeWithNullability<U, InputNullable, false>) => R;
112
- /** Calls the field resolver server-side. For authorized fields, reads the refresh cookie. */
113
- call: (root: Root, data: ParsedGQLTypeWithNullability<U, InputNullable, false>) => Promise<Awaited<R>>;
114
- /** Calls the field resolver server-side with authentication (always reads the refresh cookie). */
115
- authCall: (root: Root, data: ParsedGQLTypeWithNullability<U, InputNullable, false>) => Promise<Awaited<R>>;
128
+ /**
129
+ * Calls the field resolver server-side. For authorized fields, reads the refresh cookie.
130
+ * Resolves to `null` when `authorized: true` and there is no session.
131
+ */
132
+ call: (root: Root, data: ParsedGQLTypeWithNullability<U, InputNullable, false>) => Promise<AuthCallReturn<IsAuth, R>>;
133
+ /**
134
+ * Calls the field resolver server-side with authentication (always reads the refresh cookie).
135
+ * Resolves to `null` when `authorized: true` and there is no session.
136
+ */
137
+ authCall: (root: Root, data: ParsedGQLTypeWithNullability<U, InputNullable, false>) => Promise<AuthCallReturn<IsAuth, R>>;
138
+ /**
139
+ * Skip `FieldLibrary`'s short-circuit, which returns a pre-hydrated `root[key]`
140
+ * without ever calling this resolver.
141
+ *
142
+ * Set this on any field that gates on `ctx` — an auth check inside the resolver
143
+ * is silently bypassed the moment a parent query selects the field's value into
144
+ * its own columns. The resolver stays responsible for reusing `root[key]` when
145
+ * present, so hydration still avoids the N+1.
146
+ */
147
+ alwaysResolve?: boolean;
116
148
  }
117
149
  /**
118
150
  * Defines a type-graphql field resolver with typed root, context, and input.
@@ -26,6 +26,16 @@ type ParsedGQLTypeWithArray<T, MergeNullUndefined extends boolean> = T extends A
26
26
  type ParsedGQLTypeWithNullability<T, IsNullable extends boolean, MergeNullUndefined extends boolean> = IsNullable extends true ? ParsedGQLTypeWithArray<T, MergeNullUndefined> | null | undefined : ParsedGQLTypeWithArray<T, MergeNullUndefined>;
27
27
  /** Allows resolver to return T or Promise<T>. */
28
28
  type Promisify<T> = T | Promise<T>;
29
+ /**
30
+ * Return type of `.authCall()` / `.call()` for a definition.
31
+ *
32
+ * `authorized: true` promises the resolver an `AuthorizedContext` (non-null
33
+ * `userId`). Server-side callers can't be forced to hold a session, so when
34
+ * there's no refresh cookie the only way to keep that promise is to not call the
35
+ * resolver at all — hence the added `null`, which surfaces the logged-out case in
36
+ * the types instead of passing a null `userId` through the cast.
37
+ */
38
+ type AuthCallReturn<IsAuth extends boolean, R> = IsAuth extends true ? Awaited<R> | null : Awaited<R>;
29
39
  /** Base for query/field definition (output, input, options). */
30
40
  interface BaseDefinition<T, U, IsAuth extends boolean = false, OutputNullable extends boolean = false, InputNullable extends boolean = false> {
31
41
  output: T;
@@ -42,10 +52,16 @@ interface BaseDefinition<T, U, IsAuth extends boolean = false, OutputNullable ex
42
52
  */
43
53
  interface QueryDefinition<T, U, IsAuth extends boolean = false, OutputNullable extends boolean = false, InputNullable extends boolean = false, R extends Promisify<ParsedGQLTypeWithNullability<T, OutputNullable, true>> = Promisify<ParsedGQLTypeWithNullability<T, OutputNullable, true>>> extends BaseDefinition<T, U, IsAuth, OutputNullable, InputNullable> {
44
54
  fn: (ctx: IsAuth extends true ? AuthorizedContext : Context, data: ParsedGQLTypeWithNullability<U, InputNullable, false>) => R;
45
- /** Calls the resolver server-side. For authorized queries, reads the refresh cookie; for non-authorized, passes null userId. */
46
- call: (data: ParsedGQLTypeWithNullability<U, InputNullable, false>) => Promise<Awaited<R>>;
47
- /** Calls the resolver server-side with authentication (always reads the refresh cookie). Use in Server Components. */
48
- authCall: (data: ParsedGQLTypeWithNullability<U, InputNullable, false>) => Promise<Awaited<R>>;
55
+ /**
56
+ * Calls the resolver server-side. For authorized queries, reads the refresh cookie; for non-authorized, passes null userId.
57
+ * Resolves to `null` when `authorized: true` and there is no session.
58
+ */
59
+ call: (data: ParsedGQLTypeWithNullability<U, InputNullable, false>) => Promise<AuthCallReturn<IsAuth, R>>;
60
+ /**
61
+ * Calls the resolver server-side with authentication (always reads the refresh cookie). Use in Server Components.
62
+ * Resolves to `null` when `authorized: true` and there is no session — guard it, or gate the page ahead of it.
63
+ */
64
+ authCall: (data: ParsedGQLTypeWithNullability<U, InputNullable, false>) => Promise<AuthCallReturn<IsAuth, R>>;
49
65
  mutation?: boolean;
50
66
  }
51
67
  /**
@@ -109,10 +125,26 @@ declare function resolver<T, U, IsAuth extends boolean = false, OutputNullable e
109
125
  */
110
126
  interface FieldResolverDefinition<T, U, Root, IsAuth extends boolean = false, OutputNullable extends boolean = false, InputNullable extends boolean = false, R extends Promisify<ParsedGQLTypeWithNullability<T, OutputNullable, true>> = Promisify<ParsedGQLTypeWithNullability<T, OutputNullable, true>>> extends BaseDefinition<T, U, IsAuth, OutputNullable, InputNullable> {
111
127
  fn: (root: Root, ctx: IsAuth extends true ? AuthorizedContext : Context, data: ParsedGQLTypeWithNullability<U, InputNullable, false>) => R;
112
- /** Calls the field resolver server-side. For authorized fields, reads the refresh cookie. */
113
- call: (root: Root, data: ParsedGQLTypeWithNullability<U, InputNullable, false>) => Promise<Awaited<R>>;
114
- /** Calls the field resolver server-side with authentication (always reads the refresh cookie). */
115
- authCall: (root: Root, data: ParsedGQLTypeWithNullability<U, InputNullable, false>) => Promise<Awaited<R>>;
128
+ /**
129
+ * Calls the field resolver server-side. For authorized fields, reads the refresh cookie.
130
+ * Resolves to `null` when `authorized: true` and there is no session.
131
+ */
132
+ call: (root: Root, data: ParsedGQLTypeWithNullability<U, InputNullable, false>) => Promise<AuthCallReturn<IsAuth, R>>;
133
+ /**
134
+ * Calls the field resolver server-side with authentication (always reads the refresh cookie).
135
+ * Resolves to `null` when `authorized: true` and there is no session.
136
+ */
137
+ authCall: (root: Root, data: ParsedGQLTypeWithNullability<U, InputNullable, false>) => Promise<AuthCallReturn<IsAuth, R>>;
138
+ /**
139
+ * Skip `FieldLibrary`'s short-circuit, which returns a pre-hydrated `root[key]`
140
+ * without ever calling this resolver.
141
+ *
142
+ * Set this on any field that gates on `ctx` — an auth check inside the resolver
143
+ * is silently bypassed the moment a parent query selects the field's value into
144
+ * its own columns. The resolver stays responsible for reusing `root[key]` when
145
+ * present, so hydration still avoids the N+1.
146
+ */
147
+ alwaysResolve?: boolean;
116
148
  }
117
149
  /**
118
150
  * Defines a type-graphql field resolver with typed root, context, and input.
@@ -55,8 +55,8 @@ var getEnvValue = (key) => {
55
55
  return process.env.SIGNING_KEY;
56
56
  case "INSTAGRAM_CLIENT_SECRET" /* INSTAGRAM_CLIENT_SECRET */:
57
57
  return process.env.INSTAGRAM_CLIENT_SECRET;
58
- case "NEXT_PUBLIC_INSTAGRAM_CLIENT_ID" /* NEXT_PUBLIC_INSTAGRAM_CLIENT_ID */:
59
- return process.env.NEXT_PUBLIC_INSTAGRAM_CLIENT_ID;
58
+ case "INSTAGRAM_CLIENT_ID" /* INSTAGRAM_CLIENT_ID */:
59
+ return process.env.INSTAGRAM_CLIENT_ID;
60
60
  case "GOOGLE_CLIENT_SECRET" /* GOOGLE_CLIENT_SECRET */:
61
61
  return process.env.GOOGLE_CLIENT_SECRET;
62
62
  case "GOOGLE_CLIENT_ID" /* GOOGLE_CLIENT_ID */:
@@ -102,8 +102,16 @@ function resolver(fn, options) {
102
102
  return {
103
103
  ...options,
104
104
  fn,
105
- authCall: getAuthCaller(fn),
106
- call: options.authorized ? getAuthCaller(fn) : getCaller(fn)
105
+ authCall: getAuthCaller(
106
+ fn,
107
+ options.authorized
108
+ ),
109
+ call: options.authorized ? getAuthCaller(
110
+ fn,
111
+ options.authorized
112
+ ) : getCaller(
113
+ fn
114
+ )
107
115
  };
108
116
  }
109
117
  var getUserId = async () => {
@@ -111,11 +119,13 @@ var getUserId = async () => {
111
119
  const refresh = Cookie.get(REFRESH_COOKIE_NAME)?.value;
112
120
  return refresh ? getUserIdFromRefreshToken(refresh) : null;
113
121
  };
114
- function getAuthCaller(fn) {
122
+ function getAuthCaller(fn, authorized) {
115
123
  return cache(
116
124
  async (data) => {
125
+ const userId = await getUserId();
126
+ if (authorized && !userId) return null;
117
127
  const ctx = {
118
- userId: await getUserId(),
128
+ userId,
119
129
  isRefreshID: true
120
130
  };
121
131
  return await fn(ctx, data);
@@ -133,11 +143,13 @@ function getCaller(fn) {
133
143
  }
134
144
  );
135
145
  }
136
- function getFieldAuthCaller(fn) {
146
+ function getFieldAuthCaller(fn, authorized) {
137
147
  return cache(
138
148
  async (root, data) => {
149
+ const userId = await getUserId();
150
+ if (authorized && !userId) return null;
139
151
  const ctx = {
140
- userId: await getUserId(),
152
+ userId,
141
153
  isRefreshID: true
142
154
  };
143
155
  return await fn(root, ctx, data);
@@ -159,8 +171,8 @@ function field(fn, options) {
159
171
  return {
160
172
  ...options,
161
173
  fn,
162
- authCall: getFieldAuthCaller(fn),
163
- call: options.authorized ? getFieldAuthCaller(fn) : getFieldCaller(
174
+ authCall: getFieldAuthCaller(fn, options.authorized),
175
+ call: options.authorized ? getFieldAuthCaller(fn, options.authorized) : getFieldCaller(
164
176
  fn
165
177
  )
166
178
  };
@@ -235,8 +247,12 @@ function FieldLibrary(type, queries) {
235
247
  const def = queries[key];
236
248
  if (!def) continue;
237
249
  Object.defineProperty(GeneratedResolver.prototype, key, {
250
+ // `alwaysResolve` fields must run `fn` even when the parent pre-hydrated
251
+ // `root[key]`: they gate on `ctx`, and the short-circuit would return the
252
+ // pre-hydrated value without ever applying that check. Such a resolver is
253
+ // responsible for reusing `root[key]` itself, so the N+1 win is preserved.
238
254
  value: async function(root, ctx, input) {
239
- if (root[key]) return root[key];
255
+ if (!def.alwaysResolve && root[key]) return root[key];
240
256
  return def.fn(root, ctx, input);
241
257
  },
242
258
  writable: false
@@ -93,8 +93,8 @@ var getEnvValue = (key) => {
93
93
  return process.env.SIGNING_KEY;
94
94
  case "INSTAGRAM_CLIENT_SECRET" /* INSTAGRAM_CLIENT_SECRET */:
95
95
  return process.env.INSTAGRAM_CLIENT_SECRET;
96
- case "NEXT_PUBLIC_INSTAGRAM_CLIENT_ID" /* NEXT_PUBLIC_INSTAGRAM_CLIENT_ID */:
97
- return process.env.NEXT_PUBLIC_INSTAGRAM_CLIENT_ID;
96
+ case "INSTAGRAM_CLIENT_ID" /* INSTAGRAM_CLIENT_ID */:
97
+ return process.env.INSTAGRAM_CLIENT_ID;
98
98
  case "GOOGLE_CLIENT_SECRET" /* GOOGLE_CLIENT_SECRET */:
99
99
  return process.env.GOOGLE_CLIENT_SECRET;
100
100
  case "GOOGLE_CLIENT_ID" /* GOOGLE_CLIENT_ID */:
@@ -65,8 +65,8 @@ var getEnvValue = (key) => {
65
65
  return process.env.SIGNING_KEY;
66
66
  case "INSTAGRAM_CLIENT_SECRET" /* INSTAGRAM_CLIENT_SECRET */:
67
67
  return process.env.INSTAGRAM_CLIENT_SECRET;
68
- case "NEXT_PUBLIC_INSTAGRAM_CLIENT_ID" /* NEXT_PUBLIC_INSTAGRAM_CLIENT_ID */:
69
- return process.env.NEXT_PUBLIC_INSTAGRAM_CLIENT_ID;
68
+ case "INSTAGRAM_CLIENT_ID" /* INSTAGRAM_CLIENT_ID */:
69
+ return process.env.INSTAGRAM_CLIENT_ID;
70
70
  case "GOOGLE_CLIENT_SECRET" /* GOOGLE_CLIENT_SECRET */:
71
71
  return process.env.GOOGLE_CLIENT_SECRET;
72
72
  case "GOOGLE_CLIENT_ID" /* GOOGLE_CLIENT_ID */:
@@ -46,8 +46,8 @@ var getEnvValue = (key) => {
46
46
  return process.env.SIGNING_KEY;
47
47
  case "INSTAGRAM_CLIENT_SECRET" /* INSTAGRAM_CLIENT_SECRET */:
48
48
  return process.env.INSTAGRAM_CLIENT_SECRET;
49
- case "NEXT_PUBLIC_INSTAGRAM_CLIENT_ID" /* NEXT_PUBLIC_INSTAGRAM_CLIENT_ID */:
50
- return process.env.NEXT_PUBLIC_INSTAGRAM_CLIENT_ID;
49
+ case "INSTAGRAM_CLIENT_ID" /* INSTAGRAM_CLIENT_ID */:
50
+ return process.env.INSTAGRAM_CLIENT_ID;
51
51
  case "GOOGLE_CLIENT_SECRET" /* GOOGLE_CLIENT_SECRET */:
52
52
  return process.env.GOOGLE_CLIENT_SECRET;
53
53
  case "GOOGLE_CLIENT_ID" /* GOOGLE_CLIENT_ID */:
@@ -20,8 +20,8 @@ var getEnvValue = (key) => {
20
20
  return process.env.SIGNING_KEY;
21
21
  case "INSTAGRAM_CLIENT_SECRET" /* INSTAGRAM_CLIENT_SECRET */:
22
22
  return process.env.INSTAGRAM_CLIENT_SECRET;
23
- case "NEXT_PUBLIC_INSTAGRAM_CLIENT_ID" /* NEXT_PUBLIC_INSTAGRAM_CLIENT_ID */:
24
- return process.env.NEXT_PUBLIC_INSTAGRAM_CLIENT_ID;
23
+ case "INSTAGRAM_CLIENT_ID" /* INSTAGRAM_CLIENT_ID */:
24
+ return process.env.INSTAGRAM_CLIENT_ID;
25
25
  case "GOOGLE_CLIENT_SECRET" /* GOOGLE_CLIENT_SECRET */:
26
26
  return process.env.GOOGLE_CLIENT_SECRET;
27
27
  case "GOOGLE_CLIENT_ID" /* GOOGLE_CLIENT_ID */:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "naystack",
3
- "version": "1.7.41",
3
+ "version": "1.8.1",
4
4
  "description": "A stack built with Next + GraphQL + S3 + Auth",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",