shogun-core 3.3.7 โ 4.0.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.
- package/README.md +1378 -1221
- package/dist/browser/shogun-core.js +78074 -45286
- package/dist/browser/shogun-core.js.map +1 -1
- package/dist/core.js +2 -3
- package/dist/examples/simple-api-test.js +90 -65
- package/dist/examples/zkproof-credentials-example.js +218 -0
- package/dist/examples/zkproof-example.js +206 -0
- package/dist/gundb/api.js +111 -467
- package/dist/index.js +10 -1
- package/dist/interfaces/shogun.js +2 -2
- package/dist/managers/AuthManager.js +0 -2
- package/dist/managers/CoreInitializer.js +9 -12
- package/dist/plugins/index.js +9 -21
- package/dist/plugins/nostr/nostrConnectorPlugin.js +2 -2
- package/dist/plugins/webauthn/webauthn.js +20 -7
- package/dist/plugins/webauthn/webauthnPlugin.js +101 -17
- package/dist/plugins/zkproof/index.js +53 -0
- package/dist/plugins/zkproof/zkCredentials.js +213 -0
- package/dist/plugins/zkproof/zkProofConnector.js +198 -0
- package/dist/plugins/zkproof/zkProofPlugin.js +272 -0
- package/dist/types/core.d.ts +1 -1
- package/dist/types/examples/simple-api-test.d.ts +6 -1
- package/dist/types/examples/zkproof-credentials-example.d.ts +12 -0
- package/dist/types/examples/zkproof-example.d.ts +11 -0
- package/dist/types/gundb/api.d.ts +77 -165
- package/dist/types/gundb/types.d.ts +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/interfaces/events.d.ts +3 -3
- package/dist/types/interfaces/shogun.d.ts +9 -24
- package/dist/types/plugins/index.d.ts +5 -3
- package/dist/types/plugins/webauthn/types.d.ts +22 -1
- package/dist/types/plugins/webauthn/webauthn.d.ts +1 -1
- package/dist/types/plugins/webauthn/webauthnPlugin.d.ts +23 -2
- package/dist/types/plugins/zkproof/index.d.ts +48 -0
- package/dist/types/plugins/zkproof/types.d.ts +123 -0
- package/dist/types/plugins/zkproof/zkCredentials.d.ts +112 -0
- package/dist/types/plugins/zkproof/zkProofConnector.d.ts +46 -0
- package/dist/types/plugins/zkproof/zkProofPlugin.d.ts +76 -0
- package/dist/types/utils/seedPhrase.d.ts +50 -0
- package/dist/types/utils/validation.d.ts +2 -2
- package/dist/utils/seedPhrase.js +97 -0
- package/dist/utils/validation.js +3 -1
- package/package.json +14 -8
- package/dist/examples/api-test.js +0 -273
- package/dist/migration-test.js +0 -96
- package/dist/plugins/oauth/index.js +0 -8
- package/dist/plugins/oauth/oauthConnector.js +0 -759
- package/dist/plugins/oauth/oauthPlugin.js +0 -400
- package/dist/types/examples/api-test.d.ts +0 -12
- package/dist/types/migration-test.d.ts +0 -16
- package/dist/types/plugins/oauth/index.d.ts +0 -3
- package/dist/types/plugins/oauth/oauthConnector.d.ts +0 -110
- package/dist/types/plugins/oauth/oauthPlugin.d.ts +0 -91
- package/dist/types/plugins/oauth/types.d.ts +0 -114
- /package/dist/plugins/{oauth โ zkproof}/types.js +0 -0
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Esempio completo che mostra le differenze tra i vari metodi dell'API ShogunCore
|
|
4
|
-
*
|
|
5
|
-
* Questo esempio dimostra:
|
|
6
|
-
* - get() vs getData() vs getNode() vs node() vs chain()
|
|
7
|
-
* - put() vs set() vs putUserData() vs setUserData()
|
|
8
|
-
* - remove() vs removeUserData()
|
|
9
|
-
* - Operazioni globali vs operazioni utente
|
|
10
|
-
*/
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.demonstrateAPIDifferences = demonstrateAPIDifferences;
|
|
13
|
-
exports.showAPIDifferences = showAPIDifferences;
|
|
14
|
-
const api_1 = require("../gundb/api");
|
|
15
|
-
async function demonstrateAPIDifferences() {
|
|
16
|
-
console.log("๐ Iniziamo il test delle differenze API...\n");
|
|
17
|
-
// 1. Setup iniziale
|
|
18
|
-
const quickStart = new api_1.AutoQuickStart({
|
|
19
|
-
peers: ["https://peer.wallie.io/gun"],
|
|
20
|
-
appScope: "test-api",
|
|
21
|
-
});
|
|
22
|
-
await quickStart.init();
|
|
23
|
-
const api = quickStart.api;
|
|
24
|
-
console.log("โ
Setup completato\n");
|
|
25
|
-
// 2. Test operazioni GLOBALI (senza autenticazione)
|
|
26
|
-
console.log("๐ === TEST OPERAZIONI GLOBALI ===\n");
|
|
27
|
-
// Test get() - restituisce dati direttamente o null
|
|
28
|
-
console.log("๐ Test get():");
|
|
29
|
-
const globalData = await api.get("global/test");
|
|
30
|
-
console.log('get("global/test"):', globalData); // null se non esiste
|
|
31
|
-
// Test getNode() - restituisce nodo Gun per operazioni di chaining
|
|
32
|
-
console.log("\n๐ Test getNode():");
|
|
33
|
-
const globalNode = api.getNode("global/test");
|
|
34
|
-
console.log('getNode("global/test"):', typeof globalNode); // Gun node object
|
|
35
|
-
// Test node() - alias di getNode()
|
|
36
|
-
console.log("\n๐ Test node():");
|
|
37
|
-
const globalNode2 = api.node("global/test");
|
|
38
|
-
console.log('node("global/test"):', typeof globalNode2); // Gun node object
|
|
39
|
-
// Test chain() - wrapper con metodi di convenienza
|
|
40
|
-
console.log("\nโ๏ธ Test chain():");
|
|
41
|
-
const globalChain = api.chain("global/test");
|
|
42
|
-
console.log('chain("global/test"):', Object.keys(globalChain)); // ['get', 'put', 'set', 'once', 'then', 'map']
|
|
43
|
-
// Test put() vs set() - operazioni globali
|
|
44
|
-
console.log("\n๐พ Test put() vs set():");
|
|
45
|
-
const testData = { message: "Hello Global!", timestamp: Date.now() };
|
|
46
|
-
const putResult = await api.put("global/test", testData);
|
|
47
|
-
console.log("put() result:", putResult); // boolean
|
|
48
|
-
const setResult = await api.set("global/test2", {
|
|
49
|
-
...testData,
|
|
50
|
-
method: "set",
|
|
51
|
-
});
|
|
52
|
-
console.log("set() result:", setResult); // boolean
|
|
53
|
-
// Verifica che i dati siano stati salvati
|
|
54
|
-
const retrievedData1 = await api.get("global/test");
|
|
55
|
-
const retrievedData2 = await api.get("global/test2");
|
|
56
|
-
console.log("Retrieved put data:", retrievedData1);
|
|
57
|
-
console.log("Retrieved set data:", retrievedData2);
|
|
58
|
-
// Test remove() - operazione globale
|
|
59
|
-
console.log("\n๐๏ธ Test remove():");
|
|
60
|
-
const removeResult = await api.remove("global/test2");
|
|
61
|
-
console.log("remove() result:", removeResult); // boolean
|
|
62
|
-
const removedData = await api.get("global/test2");
|
|
63
|
-
console.log("Data after remove:", removedData); // null
|
|
64
|
-
// 3. Test autenticazione
|
|
65
|
-
console.log("\n\n๐ === TEST AUTENTICAZIONE ===\n");
|
|
66
|
-
const username = "testuser_" + Date.now();
|
|
67
|
-
const password = "testpass123";
|
|
68
|
-
// Test signup
|
|
69
|
-
console.log("๐ Test signup():");
|
|
70
|
-
const signupResult = await api.signup(username, password);
|
|
71
|
-
console.log("signup result:", signupResult);
|
|
72
|
-
if (signupResult) {
|
|
73
|
-
console.log("โ
Utente creato:", signupResult.username);
|
|
74
|
-
// Test login
|
|
75
|
-
console.log("\n๐ Test login():");
|
|
76
|
-
const loginResult = await api.login(username, password);
|
|
77
|
-
console.log("login result:", loginResult);
|
|
78
|
-
if (loginResult) {
|
|
79
|
-
console.log("โ
Login riuscito:", loginResult.username);
|
|
80
|
-
// 4. Test operazioni UTENTE (con autenticazione)
|
|
81
|
-
console.log("\n\n๐ค === TEST OPERAZIONI UTENTE ===\n");
|
|
82
|
-
// Test getUserData() - restituisce dati utente direttamente
|
|
83
|
-
console.log("๐ Test getUserData():");
|
|
84
|
-
const userData = await api.getUserData("profile");
|
|
85
|
-
console.log('getUserData("profile"):', userData); // null se non esiste
|
|
86
|
-
// Test putUserData() vs setUserData() - operazioni utente
|
|
87
|
-
console.log("\n๐พ Test putUserData() vs setUserData():");
|
|
88
|
-
const profileData = {
|
|
89
|
-
name: "Test User",
|
|
90
|
-
email: "test@example.com",
|
|
91
|
-
bio: "Test bio",
|
|
92
|
-
preferences: {
|
|
93
|
-
theme: "dark",
|
|
94
|
-
notifications: true,
|
|
95
|
-
},
|
|
96
|
-
};
|
|
97
|
-
const putUserResult = await api.putUserData("profile", profileData);
|
|
98
|
-
console.log("putUserData() result:", putUserResult); // boolean
|
|
99
|
-
const settingsData = {
|
|
100
|
-
language: "it",
|
|
101
|
-
timezone: "Europe/Rome",
|
|
102
|
-
privacy: "public",
|
|
103
|
-
};
|
|
104
|
-
const setUserResult = await api.setUserData("settings", settingsData);
|
|
105
|
-
console.log("setUserData() result:", setUserResult); // boolean
|
|
106
|
-
// Verifica che i dati utente siano stati salvati
|
|
107
|
-
const retrievedProfile = await api.getUserData("profile");
|
|
108
|
-
const retrievedSettings = await api.getUserData("settings");
|
|
109
|
-
console.log("Retrieved profile:", retrievedProfile);
|
|
110
|
-
console.log("Retrieved settings:", retrievedSettings);
|
|
111
|
-
// Test getUserNode() - nodo utente per operazioni avanzate
|
|
112
|
-
console.log("\n๐ Test getUserNode():");
|
|
113
|
-
try {
|
|
114
|
-
const userNode = api.getUserNode("profile");
|
|
115
|
-
console.log('getUserNode("profile"):', typeof userNode); // Gun node object
|
|
116
|
-
}
|
|
117
|
-
catch (error) {
|
|
118
|
-
console.log("getUserNode error:", error.message);
|
|
119
|
-
}
|
|
120
|
-
// Test removeUserData() - rimozione dati utente
|
|
121
|
-
console.log("\n๐๏ธ Test removeUserData():");
|
|
122
|
-
const removeUserResult = await api.removeUserData("settings");
|
|
123
|
-
console.log("removeUserData() result:", removeUserResult); // boolean
|
|
124
|
-
const removedUserData = await api.getUserData("settings");
|
|
125
|
-
console.log("User data after remove:", removedUserData); // null
|
|
126
|
-
// 5. Test metodi di convenienza
|
|
127
|
-
console.log("\n\n๐ ๏ธ === TEST METODI DI CONVENIENZA ===\n");
|
|
128
|
-
// Test updateProfile()
|
|
129
|
-
console.log("๐ค Test updateProfile():");
|
|
130
|
-
const profileUpdate = {
|
|
131
|
-
name: "Updated Test User",
|
|
132
|
-
bio: "Updated bio",
|
|
133
|
-
avatar: "https://example.com/avatar.jpg",
|
|
134
|
-
};
|
|
135
|
-
const profileResult = await api.updateProfile(profileUpdate);
|
|
136
|
-
console.log("updateProfile() result:", profileResult);
|
|
137
|
-
const updatedProfile = await api.getProfile();
|
|
138
|
-
console.log("Updated profile:", updatedProfile);
|
|
139
|
-
// Test saveSettings()
|
|
140
|
-
console.log("\nโ๏ธ Test saveSettings():");
|
|
141
|
-
const settings = {
|
|
142
|
-
theme: "light",
|
|
143
|
-
language: "en",
|
|
144
|
-
notifications: false,
|
|
145
|
-
};
|
|
146
|
-
const settingsResult = await api.saveSettings(settings);
|
|
147
|
-
console.log("saveSettings() result:", settingsResult);
|
|
148
|
-
const savedSettings = await api.getSettings();
|
|
149
|
-
console.log("Saved settings:", savedSettings);
|
|
150
|
-
// Test createCollection()
|
|
151
|
-
console.log("\n๐ Test createCollection():");
|
|
152
|
-
const todos = {
|
|
153
|
-
"1": { id: "1", text: "Learn ShogunCore", completed: false },
|
|
154
|
-
"2": { id: "2", text: "Build awesome app", completed: false },
|
|
155
|
-
"3": { id: "3", text: "Deploy to production", completed: true },
|
|
156
|
-
};
|
|
157
|
-
const collectionResult = await api.createCollection("todos", todos);
|
|
158
|
-
console.log("createCollection() result:", collectionResult);
|
|
159
|
-
const todosCollection = await api.getCollection("todos");
|
|
160
|
-
console.log("Todos collection:", todosCollection);
|
|
161
|
-
// Test addToCollection()
|
|
162
|
-
console.log("\nโ Test addToCollection():");
|
|
163
|
-
const newTodo = { id: "4", text: "Test API methods", completed: false };
|
|
164
|
-
const addResult = await api.addToCollection("todos", "4", newTodo);
|
|
165
|
-
console.log("addToCollection() result:", addResult);
|
|
166
|
-
const updatedCollection = await api.getCollection("todos");
|
|
167
|
-
console.log("Updated collection:", updatedCollection);
|
|
168
|
-
// Test removeFromCollection()
|
|
169
|
-
console.log("\nโ Test removeFromCollection():");
|
|
170
|
-
const removeFromCollectionResult = await api.removeFromCollection("todos", "3");
|
|
171
|
-
console.log("removeFromCollection() result:", removeFromCollectionResult);
|
|
172
|
-
const finalCollection = await api.getCollection("todos");
|
|
173
|
-
console.log("Final collection:", finalCollection);
|
|
174
|
-
// 6. Test utility methods
|
|
175
|
-
console.log("\n\n๐ง === TEST METODI UTILITY ===\n");
|
|
176
|
-
// Test getCurrentUser()
|
|
177
|
-
console.log("๐ค Test getCurrentUser():");
|
|
178
|
-
const currentUser = api.getCurrentUser();
|
|
179
|
-
console.log("Current user:", currentUser);
|
|
180
|
-
// Test isLoggedIn()
|
|
181
|
-
console.log("\n๐ Test isLoggedIn():");
|
|
182
|
-
const isLoggedIn = api.isLoggedIn();
|
|
183
|
-
console.log("Is logged in:", isLoggedIn);
|
|
184
|
-
// Test userExists()
|
|
185
|
-
console.log("\n๐ Test userExists():");
|
|
186
|
-
const userExists = await api.userExists(username);
|
|
187
|
-
console.log(`User ${username} exists:`, userExists);
|
|
188
|
-
// Test getUser()
|
|
189
|
-
console.log("\n๐ฅ Test getUser():");
|
|
190
|
-
const userInfo = await api.getUser(username);
|
|
191
|
-
console.log("User info:", userInfo);
|
|
192
|
-
// Test logout
|
|
193
|
-
console.log("\n๐ช Test logout():");
|
|
194
|
-
api.logout();
|
|
195
|
-
const isLoggedInAfter = api.isLoggedIn();
|
|
196
|
-
console.log("Is logged in after logout:", isLoggedInAfter);
|
|
197
|
-
}
|
|
198
|
-
else {
|
|
199
|
-
console.log("โ Login fallito");
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
else {
|
|
203
|
-
console.log("โ Signup fallito");
|
|
204
|
-
}
|
|
205
|
-
// 7. Test array utilities
|
|
206
|
-
console.log("\n\n๐ === TEST ARRAY UTILITIES ===\n");
|
|
207
|
-
const testArray = [
|
|
208
|
-
{ id: "1", name: "Item 1", value: 100 },
|
|
209
|
-
{ id: "2", name: "Item 2", value: 200 },
|
|
210
|
-
{ id: "3", name: "Item 3", value: 300 },
|
|
211
|
-
];
|
|
212
|
-
console.log("Original array:", testArray);
|
|
213
|
-
// Test arrayToIndexedObject()
|
|
214
|
-
const indexedObject = api.arrayToIndexedObject(testArray);
|
|
215
|
-
console.log("Array to indexed object:", indexedObject);
|
|
216
|
-
// Test indexedObjectToArray()
|
|
217
|
-
const backToArray = api.indexedObjectToArray(indexedObject);
|
|
218
|
-
console.log("Indexed object back to array:", backToArray);
|
|
219
|
-
console.log("\nโ
Test completato!");
|
|
220
|
-
}
|
|
221
|
-
// Funzione per mostrare le differenze principali
|
|
222
|
-
function showAPIDifferences() {
|
|
223
|
-
console.log(`
|
|
224
|
-
๐ === RIEPILOGO DIFFERENZE API ===
|
|
225
|
-
|
|
226
|
-
๐ METODI GET:
|
|
227
|
-
โข get(path) โ Restituisce dati direttamente o null
|
|
228
|
-
โข getNode(path) โ Restituisce nodo Gun per chaining (.map(), .on(), etc.)
|
|
229
|
-
โข node(path) โ Alias di getNode()
|
|
230
|
-
โข chain(path) โ Wrapper con metodi di convenienza (get, put, set, once, then, map)
|
|
231
|
-
โข getUserData(path) โ Come get() ma per dati utente (richiede login)
|
|
232
|
-
|
|
233
|
-
๐พ METODI PUT/SET:
|
|
234
|
-
โข put(path, data) โ Salva dati globali, restituisce boolean
|
|
235
|
-
โข set(path, data) โ Come put() ma con semantica diversa
|
|
236
|
-
โข putUserData(path, data) โ Salva dati utente, restituisce boolean
|
|
237
|
-
โข setUserData(path, data) โ Come putUserData() ma con semantica diversa
|
|
238
|
-
|
|
239
|
-
๐๏ธ METODI REMOVE:
|
|
240
|
-
โข remove(path) โ Rimuove dati globali, restituisce boolean
|
|
241
|
-
โข removeUserData(path) โ Rimuove dati utente, restituisce boolean
|
|
242
|
-
|
|
243
|
-
๐ AUTENTICAZIONE:
|
|
244
|
-
โข signup(username, password) โ Crea nuovo utente
|
|
245
|
-
โข login(username, password) โ Autentica utente esistente
|
|
246
|
-
โข logout() โ Disconnette utente
|
|
247
|
-
โข isLoggedIn() โ Controlla se utente รจ autenticato
|
|
248
|
-
|
|
249
|
-
๐ค UTILITY UTENTE:
|
|
250
|
-
โข getCurrentUser() โ Info utente corrente
|
|
251
|
-
โข getUser(alias) โ Info utente per alias
|
|
252
|
-
โข userExists(alias) โ Controlla se utente esiste
|
|
253
|
-
|
|
254
|
-
๐ ๏ธ METODI DI CONVENIENZA:
|
|
255
|
-
โข updateProfile(data) โ Aggiorna profilo utente
|
|
256
|
-
โข getProfile() โ Ottiene profilo utente
|
|
257
|
-
โข saveSettings(data) โ Salva impostazioni utente
|
|
258
|
-
โข getSettings() โ Ottiene impostazioni utente
|
|
259
|
-
โข createCollection(name, items) โ Crea collezione
|
|
260
|
-
โข addToCollection(name, id, item) โ Aggiunge item a collezione
|
|
261
|
-
โข getCollection(name) โ Ottiene collezione
|
|
262
|
-
โข removeFromCollection(name, id) โ Rimuove item da collezione
|
|
263
|
-
|
|
264
|
-
๐ ARRAY UTILITIES:
|
|
265
|
-
โข arrayToIndexedObject(arr) โ Converte array in oggetto indicizzato per GunDB
|
|
266
|
-
โข indexedObjectToArray(obj) โ Converte oggetto indicizzato in array
|
|
267
|
-
`);
|
|
268
|
-
}
|
|
269
|
-
// Esegui il test
|
|
270
|
-
if (require.main === module) {
|
|
271
|
-
showAPIDifferences();
|
|
272
|
-
demonstrateAPIDifferences().catch(console.error);
|
|
273
|
-
}
|
package/dist/migration-test.js
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Migration test file to verify that the refactored ShogunCore
|
|
4
|
-
* maintains the same public API as the original implementation
|
|
5
|
-
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.testApiCompatibility = testApiCompatibility;
|
|
8
|
-
exports.testStaticProperties = testStaticProperties;
|
|
9
|
-
exports.runCompatibilityTests = runCompatibilityTests;
|
|
10
|
-
const core_1 = require("./core");
|
|
11
|
-
const core_2 = require("./core");
|
|
12
|
-
/**
|
|
13
|
-
* Test function to verify API compatibility
|
|
14
|
-
*/
|
|
15
|
-
function testApiCompatibility() {
|
|
16
|
-
const config = {
|
|
17
|
-
gunOptions: {
|
|
18
|
-
peers: ["https://gunjs.herokuapp.com/gun"],
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
// Test that both implementations can be instantiated with the same config
|
|
22
|
-
const originalCore = new core_2.ShogunCore(config);
|
|
23
|
-
const refactoredCore = new core_1.ShogunCore(config);
|
|
24
|
-
// Test that all public methods exist on both implementations
|
|
25
|
-
const publicMethods = [
|
|
26
|
-
// Plugin management
|
|
27
|
-
"register",
|
|
28
|
-
"unregister",
|
|
29
|
-
"getPlugin",
|
|
30
|
-
"getPluginsInfo",
|
|
31
|
-
"getPluginCount",
|
|
32
|
-
"getPluginsInitializationStatus",
|
|
33
|
-
"validatePluginSystem",
|
|
34
|
-
"reinitializeFailedPlugins",
|
|
35
|
-
"checkPluginCompatibility",
|
|
36
|
-
"getPluginSystemDebugInfo",
|
|
37
|
-
"hasPlugin",
|
|
38
|
-
"getPluginsByCategory",
|
|
39
|
-
"getAuthenticationMethod",
|
|
40
|
-
// Error handling
|
|
41
|
-
"getRecentErrors",
|
|
42
|
-
// Authentication
|
|
43
|
-
"isLoggedIn",
|
|
44
|
-
"logout",
|
|
45
|
-
"login",
|
|
46
|
-
"loginWithPair",
|
|
47
|
-
"signUp",
|
|
48
|
-
// Event management
|
|
49
|
-
"emit",
|
|
50
|
-
"on",
|
|
51
|
-
"once",
|
|
52
|
-
"off",
|
|
53
|
-
"removeAllListeners",
|
|
54
|
-
// Auth method management
|
|
55
|
-
"setAuthMethod",
|
|
56
|
-
"getAuthMethod",
|
|
57
|
-
// Storage
|
|
58
|
-
"saveCredentials",
|
|
59
|
-
"getIsLoggedIn",
|
|
60
|
-
// Getters
|
|
61
|
-
"getCurrentUser",
|
|
62
|
-
];
|
|
63
|
-
const missingMethods = [];
|
|
64
|
-
publicMethods.forEach((method) => {
|
|
65
|
-
if (typeof refactoredCore[method] !== "function") {
|
|
66
|
-
missingMethods.push(method);
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
if (missingMethods.length > 0) {
|
|
70
|
-
throw new Error(`Missing methods in refactored implementation: ${missingMethods.join(", ")}`);
|
|
71
|
-
}
|
|
72
|
-
console.log("โ
API compatibility test passed - all public methods are present");
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Test that the refactored implementation maintains the same static properties
|
|
76
|
-
*/
|
|
77
|
-
function testStaticProperties() {
|
|
78
|
-
if (core_1.ShogunCore.API_VERSION !== core_2.ShogunCore.API_VERSION) {
|
|
79
|
-
throw new Error("API_VERSION mismatch between implementations");
|
|
80
|
-
}
|
|
81
|
-
console.log("โ
Static properties test passed");
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Run all compatibility tests
|
|
85
|
-
*/
|
|
86
|
-
function runCompatibilityTests() {
|
|
87
|
-
try {
|
|
88
|
-
testStaticProperties();
|
|
89
|
-
testApiCompatibility();
|
|
90
|
-
console.log("๐ All compatibility tests passed! The refactored implementation is ready.");
|
|
91
|
-
}
|
|
92
|
-
catch (error) {
|
|
93
|
-
console.error("โ Compatibility test failed:", error);
|
|
94
|
-
throw error;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OAuthPlugin = exports.OAuthConnector = void 0;
|
|
4
|
-
// OAuth plugin exports
|
|
5
|
-
var oauthConnector_1 = require("./oauthConnector");
|
|
6
|
-
Object.defineProperty(exports, "OAuthConnector", { enumerable: true, get: function () { return oauthConnector_1.OAuthConnector; } });
|
|
7
|
-
var oauthPlugin_1 = require("./oauthPlugin");
|
|
8
|
-
Object.defineProperty(exports, "OAuthPlugin", { enumerable: true, get: function () { return oauthPlugin_1.OAuthPlugin; } });
|