@storecraft/database-sql-base 1.0.11 → 1.0.13

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,122 +0,0 @@
1
- // import { App } from '@storecraft/core';
2
- // import { SQL } from '@storecraft/database-sql-base';
3
- // import { migrateToLatest } from '@storecraft/database-sql-base/migrate.js';
4
- // import { NodePlatform } from '@storecraft/core/platform/node';
5
- // import { api } from '@storecraft/core/test-runner'
6
- // import { MssqlDialect } from 'kysely';
7
- // import * as Tedious from 'tedious';
8
- // import * as Tarn from 'tarn';
9
-
10
- // /**
11
- // * NOTE: NON FUNCTIONAL YET
12
- // */
13
-
14
- // const dialect = new MssqlDialect({
15
- // tarn: {
16
- // ...Tarn,
17
- // options: {
18
- // min: 0,
19
- // max: 10,
20
- // },
21
- // },
22
- // tedious: {
23
- // ...Tedious,
24
- // connectionFactory: () => new Tedious.Connection({
25
- // authentication: {
26
- // options: {
27
- // password: process.env.MSSQL_PASSWORD,
28
- // userName: process.env.MSSQL_USER,
29
- // },
30
- // type: 'default',
31
- // },
32
- // options: {
33
- // port: parseInt(process.env.MSSQL_PORT),
34
- // trustServerCertificate: true,
35
- // },
36
- // server: process.env.MSSQL_HOST,
37
- // }),
38
- // },
39
- // });
40
-
41
- // export const create_app = async () => {
42
- // let app = new App(
43
- // new NodePlatform(),
44
- // new SQL({
45
- // dialect: dialect,
46
- // dialect_type: 'MSSQL'
47
- // }),
48
- // null, null, {
49
- // auth_admins_emails: ['admin@sc.com'],
50
- // auth_secret_access_token: 'auth_secret_access_token',
51
- // auth_secret_refresh_token: 'auth_secret_refresh_token'
52
- // }
53
- // );
54
-
55
- // await app.init();
56
- // await migrateToLatest(app.db, false);
57
- // return app;
58
- // }
59
-
60
- // async function test() {
61
- // const app = await create_app();
62
-
63
- // Object.entries(api).slice(0, -1).forEach(
64
- // ([name, runner]) => {
65
- // runner.create(app).run();
66
- // }
67
- // );
68
- // const last_test = Object.values(api).at(-1).create(app);
69
- // last_test.after(async () => { await app.db.disconnect() });
70
- // last_test.run();
71
- // }
72
-
73
- // test();
74
-
75
- // async function test2() {
76
- // const app = await create_app();
77
-
78
- // // api_index.api_auth_test.create(app).run();
79
-
80
- // // api_index.api_tags_crud_test.create(app).run();
81
- // // api_index.api_tags_list_test.create(app).run();
82
-
83
- // // api_index.api_collections_crud_test.create(app).run();
84
- // // api_index.api_collections_list_test.create(app).run();
85
- // // api_index.api_collections_products_test.create(app).run();
86
-
87
- // // api_index.api_products_crud_test.create(app).run();
88
- // // api_index.api_products_collections_test.create(app).run();
89
- // // api_index.api_products_list_test.create(app).run();
90
- // // api_index.api_products_discounts_test.create(app).run();
91
- // // api_index.api_products_variants_test.create(app).run();
92
-
93
- // // api_index.api_shipping_crud_test.create(app).run();
94
- // // api_index.api_shipping_list_test.create(app).run();
95
-
96
- // // api_index.api_posts_crud_test.create(app).run();
97
- // // api_index.api_posts_list_test.create(app).run();
98
-
99
- // // api_index.api_customers_crud_test.create(app).run();
100
- // // api_index.api_customers_list_test.create(app).run();
101
-
102
- // // api_index.api_orders_crud_test.create(app).run();
103
- // // api_index.api_orders_list_test.create(app).run();
104
-
105
- // // api_index.api_storefronts_crud_test.create(app).run();
106
- // // api_index.api_storefronts_list_test.create(app).run();
107
- // // api_index.api_storefronts_all_connections_test.create(app).run();
108
-
109
- // // api_index.api_notifications_crud_test.create(app).run();
110
- // // api_index.api_notifications_list_test.create(app).run();
111
-
112
- // api_index.api_images_crud_test.create(app).run();
113
- // api_index.api_images_list_test.create(app).run();
114
-
115
- // // api_index.api_discounts_crud_test.create(app).run();
116
- // // api_index.api_discounts_list_test.create(app).run();
117
- // // api_index.api_discounts_products_test.create(app).run();
118
-
119
-
120
- // }
121
-
122
- // // test2();