unframer 2.25.2 → 2.25.4
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/cli.d.ts +21 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +79 -48
- package/dist/cli.js.map +1 -1
- package/dist/example-code.test.d.ts +2 -0
- package/dist/example-code.test.d.ts.map +1 -0
- package/dist/example-code.test.js +72 -0
- package/dist/example-code.test.js.map +1 -0
- package/dist/exporter.d.ts +17 -55
- package/dist/exporter.d.ts.map +1 -1
- package/dist/exporter.js +73 -69
- package/dist/exporter.js.map +1 -1
- package/dist/framer.d.ts.map +1 -1
- package/dist/framer.js +99 -53
- package/dist/framer.js.map +1 -1
- package/dist/generated/api-client.js +0 -1
- package/dist/generated/api-client.js.map +1 -1
- package/dist/generated/api-client.test.js +0 -69
- package/dist/generated/api-client.test.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/esm/cli.d.ts +21 -0
- package/esm/cli.d.ts.map +1 -1
- package/esm/cli.js +78 -48
- package/esm/cli.js.map +1 -1
- package/esm/example-code.test.d.ts +2 -0
- package/esm/example-code.test.d.ts.map +1 -0
- package/esm/example-code.test.js +70 -0
- package/esm/example-code.test.js.map +1 -0
- package/esm/exporter.d.ts +17 -55
- package/esm/exporter.d.ts.map +1 -1
- package/esm/exporter.js +72 -69
- package/esm/exporter.js.map +1 -1
- package/esm/framer.d.ts.map +1 -1
- package/esm/framer.js +99 -53
- package/esm/framer.js.map +1 -1
- package/esm/generated/api-client.js +0 -1
- package/esm/generated/api-client.js.map +1 -1
- package/esm/generated/api-client.test.d.ts +0 -1
- package/esm/generated/api-client.test.js +1 -69
- package/esm/generated/api-client.test.js.map +1 -1
- package/esm/version.d.ts +1 -1
- package/esm/version.js +1 -1
- package/package.json +4 -4
- package/src/{cli.tsx → cli.ts} +114 -64
- package/src/example-code.test.ts +72 -0
- package/src/exporter.ts +99 -81
- package/src/framer.js +128 -79
- package/src/generated/api-client.d.ts +1048 -682
- package/src/generated/api-client.d.ts.map +1 -1
- package/src/generated/api-client.js +5 -6
- package/src/generated/api-client.js.map +1 -1
- package/src/generated/api-client.test.d.ts +1 -1
- package/src/generated/api-client.test.js +1 -69
- package/src/version.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export async function createClient({ url }) {
|
|
2
|
-
const { createSpiceflowClient } = await import('spiceflow/client')
|
|
2
|
+
const { createSpiceflowClient } = await import('spiceflow/client')
|
|
3
3
|
const client = createSpiceflowClient(url, {
|
|
4
4
|
// async fetch(input, requestInit) {
|
|
5
5
|
// const res = await fetch(input, requestInit)
|
|
@@ -16,11 +16,10 @@ export async function createClient({ url }) {
|
|
|
16
16
|
// },
|
|
17
17
|
headers() {
|
|
18
18
|
return {
|
|
19
|
-
|
|
20
|
-
}
|
|
19
|
+
// Cookie: `sb-${supabaseRef}-auth-token=${encodeURIComponent(JSON.stringify(session))}`,
|
|
20
|
+
}
|
|
21
21
|
},
|
|
22
|
-
})
|
|
23
|
-
return client
|
|
22
|
+
})
|
|
23
|
+
return client
|
|
24
24
|
}
|
|
25
25
|
// export const websiteApiClient = createClient({ url: process.env.PUBLIC_URL! })
|
|
26
|
-
//# sourceMappingURL=api-client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1,69 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { createClient } from './client';
|
|
3
|
-
import { env, supabaseRef } from './env';
|
|
4
|
-
import { createSupabaseAdmin, createSupabaseAnon } from './supabase.server';
|
|
5
|
-
import { db } from 'db/kysely';
|
|
6
|
-
test('hono client', async () => {
|
|
7
|
-
const admin = createSupabaseAdmin();
|
|
8
|
-
const email = 'test@example.com';
|
|
9
|
-
const password = 'xxpasswordxx99776';
|
|
10
|
-
const { error: signupError } = await admin.auth.admin.createUser({
|
|
11
|
-
email,
|
|
12
|
-
password,
|
|
13
|
-
email_confirm: true,
|
|
14
|
-
});
|
|
15
|
-
// expect(signupError).toBe(null)
|
|
16
|
-
const supabase = createSupabaseAnon();
|
|
17
|
-
const { data, error } = await supabase.auth.signInWithPassword({
|
|
18
|
-
email,
|
|
19
|
-
password,
|
|
20
|
-
});
|
|
21
|
-
expect(error).toBe(null);
|
|
22
|
-
const session = data.session;
|
|
23
|
-
const client = createClient({
|
|
24
|
-
url: `http://localhost:${env.PORT}`,
|
|
25
|
-
session,
|
|
26
|
-
supabaseRef,
|
|
27
|
-
});
|
|
28
|
-
const res = await client.api.v1.health.$get({});
|
|
29
|
-
expect(res.status).toBe(200);
|
|
30
|
-
const json = await res.json();
|
|
31
|
-
expect(json).toMatchInlineSnapshot(`
|
|
32
|
-
{
|
|
33
|
-
"ok": true,
|
|
34
|
-
}
|
|
35
|
-
`);
|
|
36
|
-
});
|
|
37
|
-
test('get conversations with my account', async () => {
|
|
38
|
-
const admin = createSupabaseAdmin();
|
|
39
|
-
const email = 'beats.by.morse@gmail.com';
|
|
40
|
-
const password = env.CRISP_WEBHOOKS_SECRET;
|
|
41
|
-
const user = await db
|
|
42
|
-
.selectFrom('auth.users')
|
|
43
|
-
.selectAll()
|
|
44
|
-
.where('email', '=', email)
|
|
45
|
-
.executeTakeFirst();
|
|
46
|
-
// uncomment this to set the password the first time
|
|
47
|
-
// const { error: signupError } = await admin.auth.admin.updateUserById(
|
|
48
|
-
// user!.id,
|
|
49
|
-
// { password },
|
|
50
|
-
// )
|
|
51
|
-
// expect(signupError).toBe(null)
|
|
52
|
-
const supabase = createSupabaseAnon();
|
|
53
|
-
const { data, error } = await supabase.auth.signInWithPassword({
|
|
54
|
-
email,
|
|
55
|
-
password,
|
|
56
|
-
});
|
|
57
|
-
expect(error).toBe(null);
|
|
58
|
-
const session = data.session;
|
|
59
|
-
const client = createClient({
|
|
60
|
-
url: `http://localhost:${env.PORT}`,
|
|
61
|
-
session,
|
|
62
|
-
supabaseRef,
|
|
63
|
-
});
|
|
64
|
-
const res = await client.api.v1.conversations.$get({});
|
|
65
|
-
expect(res.status).toBe(200);
|
|
66
|
-
const json = await res.json();
|
|
67
|
-
expect(json.conversations.length).toBeGreaterThan(0);
|
|
68
|
-
console.log(json.conversations);
|
|
69
|
-
});
|
|
1
|
+
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '2.25.
|
|
1
|
+
export const version = '2.25.4'
|