@nlabs/metropolisjs 0.1.1 → 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.
- package/.github/copilot-instructions.md +167 -0
- package/AGENTS.md +13 -0
- package/CHANGELOG.md +112 -0
- package/GRAPHQL_VALIDATION_RESULTS.md +158 -0
- package/PERMISSION_GRAPHQL_INTEGRATION.md +293 -0
- package/PERMISSION_IMPLEMENTATION_SUMMARY.md +243 -0
- package/README.md +1343 -0
- package/SIGNIN_GRAPHQL_VALIDATION.md +125 -0
- package/VAULT_GRAPHQL_API_FINDINGS.md +312 -0
- package/docs/ACTIONS.md +63 -0
- package/docs/COLLECTIONS.md +1038 -0
- package/docs/CONNECTIONS.md +1367 -0
- package/docs/CRUD_INTEGRATION.md +702 -0
- package/examples/connections-usage.tsx +909 -0
- package/examples/content-actions-usage.ts +144 -0
- package/examples/crud-usage.tsx +847 -0
- package/examples/extensibility-usage.tsx +889 -0
- package/examples/factory-pattern-usage.ts +283 -0
- package/examples/i18n-import-examples.ts +86 -0
- package/examples/i18n-namespace-usage.ts +118 -0
- package/examples/i18next-singleton-demo.ts +187 -0
- package/examples/permission-system-usage.tsx +415 -0
- package/examples/project-details.tsx +397 -0
- package/examples/shared-i18n-usage.tsx +203 -0
- package/examples/signup-error-handling.ts +100 -0
- package/examples/translation-types.ts +86 -0
- package/examples/translation-usage.tsx +336 -0
- package/factoryPatternGuide.md +244 -0
- package/index.js +1 -0
- package/jest.config.mjs +28 -0
- package/lex.config.mjs +26 -0
- package/lib/__tests__/e2e/helpers/testGraphQLServer.d.ts +22 -0
- package/lib/__tests__/e2e/helpers/testGraphQLServer.d.ts.map +1 -0
- package/lib/__tests__/e2e/helpers/testGraphQLServer.js +197 -0
- package/lib/__tests__/e2e/helpers/testGraphQLServerSimple.d.ts +3 -0
- package/lib/__tests__/e2e/helpers/testGraphQLServerSimple.d.ts.map +1 -0
- package/lib/__tests__/e2e/helpers/testGraphQLServerSimple.js +52 -0
- package/lib/actions/appActions/appActions.d.ts +29 -0
- package/lib/actions/appActions/appActions.d.ts.map +1 -0
- package/lib/actions/appActions/appActions.js +159 -0
- package/lib/actions/connectionActions/connectionActions.d.ts +19 -0
- package/lib/actions/connectionActions/connectionActions.d.ts.map +1 -0
- package/lib/actions/connectionActions/connectionActions.js +131 -0
- package/lib/actions/contentActions/contentActions.d.ts +34 -0
- package/lib/actions/contentActions/contentActions.d.ts.map +1 -0
- package/lib/actions/contentActions/contentActions.js +314 -0
- package/lib/actions/conversationActions/conversationActions.d.ts +30 -0
- package/lib/actions/conversationActions/conversationActions.d.ts.map +1 -0
- package/lib/actions/conversationActions/conversationActions.js +225 -0
- package/lib/actions/eventActions/eventActions.d.ts +65 -0
- package/lib/actions/eventActions/eventActions.d.ts.map +1 -0
- package/lib/actions/eventActions/eventActions.js +436 -0
- package/lib/actions/groupActions/groupActions.d.ts +30 -0
- package/lib/actions/groupActions/groupActions.d.ts.map +1 -0
- package/lib/actions/groupActions/groupActions.js +229 -0
- package/lib/actions/imageActions/imageActions.d.ts +62 -0
- package/lib/actions/imageActions/imageActions.d.ts.map +1 -0
- package/lib/actions/imageActions/imageActions.js +593 -0
- package/lib/actions/index.d.ts +21 -0
- package/lib/actions/index.d.ts.map +1 -0
- package/lib/actions/index.js +22 -0
- package/lib/actions/locationActions/locationActions.d.ts +60 -0
- package/lib/actions/locationActions/locationActions.d.ts.map +1 -0
- package/lib/actions/locationActions/locationActions.js +388 -0
- package/lib/actions/messageActions/messageActions.d.ts +38 -0
- package/lib/actions/messageActions/messageActions.d.ts.map +1 -0
- package/lib/actions/messageActions/messageActions.js +235 -0
- package/lib/actions/permissionActions/permissionActions.d.ts +34 -0
- package/lib/actions/permissionActions/permissionActions.d.ts.map +1 -0
- package/lib/actions/permissionActions/permissionActions.js +330 -0
- package/lib/actions/personaActions/personaActions.d.ts +65 -0
- package/lib/actions/personaActions/personaActions.d.ts.map +1 -0
- package/lib/actions/personaActions/personaActions.js +572 -0
- package/lib/actions/postActions/postActions.d.ts +36 -0
- package/lib/actions/postActions/postActions.d.ts.map +1 -0
- package/lib/actions/postActions/postActions.js +447 -0
- package/lib/actions/reactionActions/reactionActions.d.ts +38 -0
- package/lib/actions/reactionActions/reactionActions.d.ts.map +1 -0
- package/lib/actions/reactionActions/reactionActions.js +413 -0
- package/lib/actions/sseActions/sseActions.d.ts +38 -0
- package/lib/actions/sseActions/sseActions.d.ts.map +1 -0
- package/lib/actions/sseActions/sseActions.js +148 -0
- package/lib/actions/subscriptionActions/subscriptionActions.d.ts +24 -0
- package/lib/actions/subscriptionActions/subscriptionActions.d.ts.map +1 -0
- package/lib/actions/subscriptionActions/subscriptionActions.js +329 -0
- package/lib/actions/tagActions/tagActions.d.ts +37 -0
- package/lib/actions/tagActions/tagActions.d.ts.map +1 -0
- package/lib/actions/tagActions/tagActions.js +347 -0
- package/lib/actions/translationActions/translationActions.d.ts +38 -0
- package/lib/actions/translationActions/translationActions.d.ts.map +1 -0
- package/lib/actions/translationActions/translationActions.js +189 -0
- package/lib/actions/userActions/userActions.d.ts +78 -0
- package/lib/actions/userActions/userActions.d.ts.map +1 -0
- package/lib/actions/userActions/userActions.js +844 -0
- package/lib/actions/videoActions/videoActions.d.ts +41 -0
- package/lib/actions/videoActions/videoActions.d.ts.map +1 -0
- package/lib/actions/videoActions/videoActions.js +532 -0
- package/lib/actions/websocketActions/websocketActions.d.ts +30 -0
- package/lib/actions/websocketActions/websocketActions.d.ts.map +1 -0
- package/lib/actions/websocketActions/websocketActions.js +377 -0
- package/lib/adapters/appAdapter/appAdapter.d.ts +8 -0
- package/lib/adapters/appAdapter/appAdapter.d.ts.map +1 -0
- package/lib/adapters/appAdapter/appAdapter.js +90 -0
- package/lib/adapters/arangoAdapter/arangoAdapter.d.ts +21 -0
- package/lib/adapters/arangoAdapter/arangoAdapter.d.ts.map +1 -0
- package/lib/adapters/arangoAdapter/arangoAdapter.js +75 -0
- package/lib/adapters/contentAdapter/contentAdapter.d.ts +32 -0
- package/lib/adapters/contentAdapter/contentAdapter.d.ts.map +1 -0
- package/lib/adapters/contentAdapter/contentAdapter.js +107 -0
- package/lib/adapters/conversationAdapter/conversationAdapter.d.ts +24 -0
- package/lib/adapters/conversationAdapter/conversationAdapter.d.ts.map +1 -0
- package/lib/adapters/conversationAdapter/conversationAdapter.js +75 -0
- package/lib/adapters/eventAdapter/eventAdapter.d.ts +46 -0
- package/lib/adapters/eventAdapter/eventAdapter.d.ts.map +1 -0
- package/lib/adapters/eventAdapter/eventAdapter.js +162 -0
- package/lib/adapters/fileAdapter/fileAdapter.d.ts +30 -0
- package/lib/adapters/fileAdapter/fileAdapter.d.ts.map +1 -0
- package/lib/adapters/fileAdapter/fileAdapter.js +118 -0
- package/lib/adapters/groupAdapter/groupAdapter.d.ts +28 -0
- package/lib/adapters/groupAdapter/groupAdapter.d.ts.map +1 -0
- package/lib/adapters/groupAdapter/groupAdapter.js +66 -0
- package/lib/adapters/imageAdapter/imageAdapter.d.ts +38 -0
- package/lib/adapters/imageAdapter/imageAdapter.d.ts.map +1 -0
- package/lib/adapters/imageAdapter/imageAdapter.js +134 -0
- package/lib/adapters/index.d.ts +34 -0
- package/lib/adapters/index.d.ts.map +1 -0
- package/lib/adapters/index.js +19 -0
- package/lib/adapters/locationAdapter/locationAdapter.d.ts +28 -0
- package/lib/adapters/locationAdapter/locationAdapter.d.ts.map +1 -0
- package/lib/adapters/locationAdapter/locationAdapter.js +95 -0
- package/lib/adapters/messageAdapter/messageAdapter.d.ts +31 -0
- package/lib/adapters/messageAdapter/messageAdapter.d.ts.map +1 -0
- package/lib/adapters/messageAdapter/messageAdapter.js +82 -0
- package/lib/adapters/permissionAdapter/permissionAdapter.d.ts +41 -0
- package/lib/adapters/permissionAdapter/permissionAdapter.d.ts.map +1 -0
- package/lib/adapters/permissionAdapter/permissionAdapter.js +120 -0
- package/lib/adapters/personaAdapter/personaAdapter.d.ts +44 -0
- package/lib/adapters/personaAdapter/personaAdapter.d.ts.map +1 -0
- package/lib/adapters/personaAdapter/personaAdapter.js +161 -0
- package/lib/adapters/postAdapter/postAdapter.d.ts +33 -0
- package/lib/adapters/postAdapter/postAdapter.d.ts.map +1 -0
- package/lib/adapters/postAdapter/postAdapter.js +115 -0
- package/lib/adapters/reactionAdapter/reactionAdapter.d.ts +23 -0
- package/lib/adapters/reactionAdapter/reactionAdapter.d.ts.map +1 -0
- package/lib/adapters/reactionAdapter/reactionAdapter.js +81 -0
- package/lib/adapters/reaktorAdapter/reaktorAdapter.d.ts +17 -0
- package/lib/adapters/reaktorAdapter/reaktorAdapter.d.ts.map +1 -0
- package/lib/adapters/reaktorAdapter/reaktorAdapter.js +58 -0
- package/lib/adapters/sessionAdapter/sessionAdapter.d.ts +24 -0
- package/lib/adapters/sessionAdapter/sessionAdapter.d.ts.map +1 -0
- package/lib/adapters/sessionAdapter/sessionAdapter.js +80 -0
- package/lib/adapters/tagAdapter/tagAdapter.d.ts +21 -0
- package/lib/adapters/tagAdapter/tagAdapter.d.ts.map +1 -0
- package/lib/adapters/tagAdapter/tagAdapter.js +98 -0
- package/lib/adapters/translationAdapter/translationAdapter.d.ts +21 -0
- package/lib/adapters/translationAdapter/translationAdapter.d.ts.map +1 -0
- package/lib/adapters/translationAdapter/translationAdapter.js +55 -0
- package/lib/adapters/userAdapter/userAdapter.d.ts +67 -0
- package/lib/adapters/userAdapter/userAdapter.d.ts.map +1 -0
- package/lib/adapters/userAdapter/userAdapter.js +302 -0
- package/lib/adapters/videoAdapter/videoAdapter.d.ts +8 -0
- package/lib/adapters/videoAdapter/videoAdapter.d.ts.map +1 -0
- package/lib/adapters/videoAdapter/videoAdapter.js +194 -0
- package/lib/config/index.d.ts +44 -0
- package/lib/config/index.d.ts.map +1 -0
- package/lib/config/index.js +97 -0
- package/lib/constants/Collections.d.ts +44 -0
- package/lib/constants/Collections.d.ts.map +1 -0
- package/lib/constants/Collections.js +40 -0
- package/lib/constants/MetropolisConstants.d.ts +15 -0
- package/lib/constants/MetropolisConstants.d.ts.map +1 -0
- package/lib/constants/MetropolisConstants.js +15 -0
- package/lib/graphql/message.d.ts +3 -0
- package/lib/graphql/message.d.ts.map +1 -0
- package/lib/graphql/message.js +20 -0
- package/lib/graphql/notification.d.ts +3 -0
- package/lib/graphql/notification.d.ts.map +1 -0
- package/lib/graphql/notification.js +20 -0
- package/lib/graphql/session.d.ts +2 -0
- package/lib/graphql/session.d.ts.map +1 -0
- package/lib/graphql/session.js +17 -0
- package/lib/index.d.ts +52 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +248 -0
- package/lib/stores/appStore.d.ts +23 -0
- package/lib/stores/appStore.d.ts.map +1 -0
- package/lib/stores/appStore.js +23 -0
- package/lib/stores/contentStore.d.ts +36 -0
- package/lib/stores/contentStore.d.ts.map +1 -0
- package/lib/stores/contentStore.js +139 -0
- package/lib/stores/conversationStore.d.ts +38 -0
- package/lib/stores/conversationStore.d.ts.map +1 -0
- package/lib/stores/conversationStore.js +117 -0
- package/lib/stores/eventStore.d.ts +37 -0
- package/lib/stores/eventStore.d.ts.map +1 -0
- package/lib/stores/eventStore.js +47 -0
- package/lib/stores/groupStore.d.ts +37 -0
- package/lib/stores/groupStore.d.ts.map +1 -0
- package/lib/stores/groupStore.js +68 -0
- package/lib/stores/imageStore.d.ts +40 -0
- package/lib/stores/imageStore.d.ts.map +1 -0
- package/lib/stores/imageStore.js +53 -0
- package/lib/stores/index.d.ts +24 -0
- package/lib/stores/index.d.ts.map +1 -0
- package/lib/stores/index.js +24 -0
- package/lib/stores/locationStore.d.ts +34 -0
- package/lib/stores/locationStore.d.ts.map +1 -0
- package/lib/stores/locationStore.js +42 -0
- package/lib/stores/messageStore.d.ts +51 -0
- package/lib/stores/messageStore.d.ts.map +1 -0
- package/lib/stores/messageStore.js +137 -0
- package/lib/stores/notificationStore.d.ts +33 -0
- package/lib/stores/notificationStore.d.ts.map +1 -0
- package/lib/stores/notificationStore.js +55 -0
- package/lib/stores/permissionStore.d.ts +37 -0
- package/lib/stores/permissionStore.d.ts.map +1 -0
- package/lib/stores/permissionStore.js +117 -0
- package/lib/stores/personaStore.d.ts +26 -0
- package/lib/stores/personaStore.d.ts.map +1 -0
- package/lib/stores/personaStore.js +118 -0
- package/lib/stores/postStore.d.ts +34 -0
- package/lib/stores/postStore.d.ts.map +1 -0
- package/lib/stores/postStore.js +53 -0
- package/lib/stores/reactionStore.d.ts +25 -0
- package/lib/stores/reactionStore.d.ts.map +1 -0
- package/lib/stores/reactionStore.js +28 -0
- package/lib/stores/subscriptionStore.d.ts +41 -0
- package/lib/stores/subscriptionStore.d.ts.map +1 -0
- package/lib/stores/subscriptionStore.js +85 -0
- package/lib/stores/tagStore.d.ts +34 -0
- package/lib/stores/tagStore.d.ts.map +1 -0
- package/lib/stores/tagStore.js +87 -0
- package/lib/stores/translationStore.d.ts +42 -0
- package/lib/stores/translationStore.d.ts.map +1 -0
- package/lib/stores/translationStore.js +122 -0
- package/lib/stores/userStore.d.ts +74 -0
- package/lib/stores/userStore.d.ts.map +1 -0
- package/lib/stores/userStore.js +319 -0
- package/lib/stores/videoStore.d.ts +39 -0
- package/lib/stores/videoStore.d.ts.map +1 -0
- package/lib/stores/videoStore.js +132 -0
- package/lib/stores/websocketStore.d.ts +24 -0
- package/lib/stores/websocketStore.d.ts.map +1 -0
- package/lib/stores/websocketStore.js +51 -0
- package/lib/types/apps.types.d.ts +17 -0
- package/lib/types/apps.types.d.ts.map +1 -0
- package/lib/types/apps.types.js +6 -0
- package/lib/types/common.types.d.ts +31 -0
- package/lib/types/common.types.d.ts.map +1 -0
- package/lib/types/common.types.js +6 -0
- package/lib/types/conversations.types.d.ts +17 -0
- package/lib/types/conversations.types.d.ts.map +1 -0
- package/lib/types/conversations.types.js +6 -0
- package/lib/types/edges.types.d.ts +38 -0
- package/lib/types/edges.types.d.ts.map +1 -0
- package/lib/types/edges.types.js +6 -0
- package/lib/types/groups.types.d.ts +19 -0
- package/lib/types/groups.types.d.ts.map +1 -0
- package/lib/types/groups.types.js +6 -0
- package/lib/types/index.d.ts +12 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +12 -0
- package/lib/types/subscriptions.types.d.ts +32 -0
- package/lib/types/subscriptions.types.d.ts.map +1 -0
- package/lib/types/subscriptions.types.js +6 -0
- package/lib/types/videos.types.d.ts +61 -0
- package/lib/types/videos.types.d.ts.map +1 -0
- package/lib/types/videos.types.js +6 -0
- package/lib/utils/MetropolisProvider.d.ts +58 -0
- package/lib/utils/MetropolisProvider.d.ts.map +1 -0
- package/lib/utils/MetropolisProvider.js +31 -0
- package/lib/utils/actionFactory.d.ts +24 -0
- package/lib/utils/actionFactory.d.ts.map +1 -0
- package/lib/utils/actionFactory.js +95 -0
- package/lib/utils/api.d.ts +44 -0
- package/lib/utils/api.d.ts.map +1 -0
- package/lib/utils/api.js +253 -0
- package/lib/utils/app.d.ts +7 -0
- package/lib/utils/app.d.ts.map +1 -0
- package/lib/utils/app.js +15 -0
- package/lib/utils/baseActionFactory.d.ts +16 -0
- package/lib/utils/baseActionFactory.d.ts.map +1 -0
- package/lib/utils/baseActionFactory.js +72 -0
- package/lib/utils/configUtils.d.ts +11 -0
- package/lib/utils/configUtils.d.ts.map +1 -0
- package/lib/utils/configUtils.js +20 -0
- package/lib/utils/dateUtils.d.ts +3 -0
- package/lib/utils/dateUtils.d.ts.map +1 -0
- package/lib/utils/dateUtils.js +11 -0
- package/lib/utils/file.d.ts +3 -0
- package/lib/utils/file.d.ts.map +1 -0
- package/lib/utils/file.js +156 -0
- package/lib/utils/i18n.d.ts +7 -0
- package/lib/utils/i18n.d.ts.map +1 -0
- package/lib/utils/i18n.js +96 -0
- package/lib/utils/index.d.ts +20 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/index.js +26 -0
- package/lib/utils/location.d.ts +10 -0
- package/lib/utils/location.d.ts.map +1 -0
- package/lib/utils/location.js +82 -0
- package/lib/utils/permissionUtils.d.ts +22 -0
- package/lib/utils/permissionUtils.d.ts.map +1 -0
- package/lib/utils/permissionUtils.js +72 -0
- package/lib/utils/requestCache.d.ts +8 -0
- package/lib/utils/requestCache.d.ts.map +1 -0
- package/lib/utils/requestCache.js +53 -0
- package/lib/utils/session.d.ts +14 -0
- package/lib/utils/session.d.ts.map +1 -0
- package/lib/utils/session.js +107 -0
- package/lib/utils/useConversationTyping.d.ts +26 -0
- package/lib/utils/useConversationTyping.d.ts.map +1 -0
- package/lib/utils/useConversationTyping.js +117 -0
- package/lib/utils/useMetropolis.d.ts +67 -0
- package/lib/utils/useMetropolis.d.ts.map +1 -0
- package/lib/utils/useMetropolis.js +311 -0
- package/lib/utils/useTranslations.d.ts +16 -0
- package/lib/utils/useTranslations.d.ts.map +1 -0
- package/lib/utils/useTranslations.js +105 -0
- package/lib/utils/validatorFactory.d.ts +49 -0
- package/lib/utils/validatorFactory.d.ts.map +1 -0
- package/lib/utils/validatorFactory.js +95 -0
- package/package.json +75 -28
- package/temp_signin.ts +73 -0
- package/tsconfig.lint.json +25 -0
- package/tsconfig.test.json +14 -0
package/package.json
CHANGED
|
@@ -1,18 +1,51 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nlabs/metropolisjs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "MetropolisJS is a library to connect users to Reaktor",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"main": "lib/index.js",
|
|
6
|
-
"module": "
|
|
7
|
-
"
|
|
7
|
+
"module": "lib/index.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./lib/index.js",
|
|
11
|
+
"require": "./lib/index.js",
|
|
12
|
+
"types": "./lib/index.d.ts"
|
|
13
|
+
},
|
|
14
|
+
"./stores": {
|
|
15
|
+
"import": "./lib/stores/index.js",
|
|
16
|
+
"require": "./lib/stores/index.js",
|
|
17
|
+
"types": "./lib/stores/index.d.ts"
|
|
18
|
+
},
|
|
19
|
+
"./actions": {
|
|
20
|
+
"import": "./lib/actions/index.js",
|
|
21
|
+
"require": "./lib/actions/index.js",
|
|
22
|
+
"types": "./lib/actions/index.d.ts"
|
|
23
|
+
},
|
|
24
|
+
"./adapters": {
|
|
25
|
+
"import": "./lib/adapters/index.js",
|
|
26
|
+
"require": "./lib/adapters/index.js",
|
|
27
|
+
"types": "./lib/adapters/index.d.ts"
|
|
28
|
+
},
|
|
29
|
+
"./utils": {
|
|
30
|
+
"import": "./lib/utils/index.js",
|
|
31
|
+
"require": "./lib/utils/index.js",
|
|
32
|
+
"types": "./lib/utils/index.d.ts"
|
|
33
|
+
},
|
|
34
|
+
"./config": {
|
|
35
|
+
"import": "./lib/config/index.js",
|
|
36
|
+
"require": "./lib/config/index.js",
|
|
37
|
+
"types": "./lib/config/index.d.ts"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
8
40
|
"types": "./lib/index.d.ts",
|
|
9
41
|
"scripts": {
|
|
10
|
-
"build": "lex compile
|
|
42
|
+
"build": "lex compile --remove && npm run postbuild",
|
|
43
|
+
"build:dev": "NODE_ENV=development lex compile --remove",
|
|
44
|
+
"postbuild": "npx tsc-esm-fix lib",
|
|
11
45
|
"clean": "lex clean",
|
|
12
|
-
"dev": "lex dev
|
|
46
|
+
"dev": "lex dev --remove",
|
|
13
47
|
"format": "npm run prettier && npm run lint",
|
|
14
|
-
"lint": "
|
|
15
|
-
"pretest": "npm run lint",
|
|
48
|
+
"lint": "lex lint --fix",
|
|
16
49
|
"prettier": "prettier --write ./src",
|
|
17
50
|
"production": "lex build",
|
|
18
51
|
"publish:major": "npm version major && npm run publish:tags && npm publish",
|
|
@@ -21,8 +54,8 @@
|
|
|
21
54
|
"publish:tags": "git push --tags && git push origin HEAD",
|
|
22
55
|
"start": "lex dev -r -o",
|
|
23
56
|
"test": "lex test",
|
|
24
|
-
"update": "lex update
|
|
25
|
-
"watch": "lex compile
|
|
57
|
+
"update": "lex update --interactive",
|
|
58
|
+
"watch": "lex compile --watch"
|
|
26
59
|
},
|
|
27
60
|
"repository": {
|
|
28
61
|
"type": "git",
|
|
@@ -41,28 +74,42 @@
|
|
|
41
74
|
},
|
|
42
75
|
"license": "MIT",
|
|
43
76
|
"dependencies": {
|
|
44
|
-
"@nlabs/rip-hunter": "
|
|
45
|
-
"@nlabs/utils": "^
|
|
46
|
-
"
|
|
47
|
-
"luxon": "^
|
|
48
|
-
"p-debounce": "^
|
|
49
|
-
"react": "^
|
|
50
|
-
"sockette": "^2.0.6"
|
|
77
|
+
"@nlabs/rip-hunter": "3.1.0",
|
|
78
|
+
"@nlabs/utils": "^2.8.6",
|
|
79
|
+
"i18next": "^25.10.9",
|
|
80
|
+
"luxon": "^3.7.2",
|
|
81
|
+
"p-debounce": "^5.1.0",
|
|
82
|
+
"react-i18next": "^16.6.6",
|
|
83
|
+
"sockette": "^2.0.6",
|
|
84
|
+
"zod": "^4.3.6"
|
|
51
85
|
},
|
|
52
86
|
"devDependencies": {
|
|
53
|
-
"@
|
|
54
|
-
"@nlabs/arkhamjs
|
|
55
|
-
"@
|
|
56
|
-
"@
|
|
57
|
-
"@
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
87
|
+
"@jest/globals": "30.3.0",
|
|
88
|
+
"@nlabs/arkhamjs": "3.31.9",
|
|
89
|
+
"@nlabs/arkhamjs-storage-browser": "^3.30.6",
|
|
90
|
+
"@nlabs/arkhamjs-utils-react": "^3.32.7",
|
|
91
|
+
"@nlabs/lex": "^1.55.2",
|
|
92
|
+
"@types/jest": "^30.0.0",
|
|
93
|
+
"@types/node": "^25.5.0",
|
|
94
|
+
"@types/react": "^19.2.14",
|
|
95
|
+
"react": "^19.2.4",
|
|
96
|
+
"typescript": "^6.0.2"
|
|
62
97
|
},
|
|
63
98
|
"peerDependencies": {
|
|
64
|
-
"@nlabs/arkhamjs": "^3.
|
|
65
|
-
"@nlabs/arkhamjs-storage-browser": "^3.
|
|
66
|
-
"@nlabs/arkhamjs-utils-react": "^3.
|
|
99
|
+
"@nlabs/arkhamjs": "^3.31.1",
|
|
100
|
+
"@nlabs/arkhamjs-storage-browser": "^3.30.0",
|
|
101
|
+
"@nlabs/arkhamjs-utils-react": "^3.32.0",
|
|
102
|
+
"react": "^19.1.0"
|
|
103
|
+
},
|
|
104
|
+
"overrides": {
|
|
105
|
+
"cross-spawn": "^7.0.6",
|
|
106
|
+
"got": "^14.6.5",
|
|
107
|
+
"http-cache-semantics": "^4.2.0",
|
|
108
|
+
"http-proxy-middleware": "^3.0.5",
|
|
109
|
+
"lodash.pick": "npm:lodash@^4.17.21",
|
|
110
|
+
"nth-check": "^2.1.1",
|
|
111
|
+
"postcss": "^8.5.6",
|
|
112
|
+
"semver-regex": "^4.0.5",
|
|
113
|
+
"tmp": "^0.2.5"
|
|
67
114
|
}
|
|
68
115
|
}
|
package/temp_signin.ts
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Correct usage of signIn from MetropolisJS userActions
|
|
3
|
+
* This replaces the incorrect manual GraphQL construction
|
|
4
|
+
*/
|
|
5
|
+
import {FluxFramework} from '@nlabs/arkhamjs';
|
|
6
|
+
import {createUserActions} from './src/actions/userActions/userActions';
|
|
7
|
+
|
|
8
|
+
// Create flux instance and user actions
|
|
9
|
+
const flux = new FluxFramework();
|
|
10
|
+
const userActions = createUserActions(flux);
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Correct signIn usage - pass user object with authentication fields
|
|
14
|
+
*/
|
|
15
|
+
const signInUser = async (username: string, password: string, expires: number = 15) => {
|
|
16
|
+
try {
|
|
17
|
+
// Correct way: pass user object with username/password
|
|
18
|
+
const session = await userActions.signIn({
|
|
19
|
+
username,
|
|
20
|
+
password
|
|
21
|
+
}, expires);
|
|
22
|
+
|
|
23
|
+
console.log('Sign in successful:', session);
|
|
24
|
+
return {success: true, session};
|
|
25
|
+
} catch (error: any) {
|
|
26
|
+
console.error('Sign in failed:', error.message);
|
|
27
|
+
return {success: false, error: error.message};
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Alternative: sign in with email
|
|
33
|
+
*/
|
|
34
|
+
const signInWithEmail = async (email: string, password: string, expires: number = 15) => {
|
|
35
|
+
try {
|
|
36
|
+
const session = await userActions.signIn({
|
|
37
|
+
email,
|
|
38
|
+
password
|
|
39
|
+
}, expires);
|
|
40
|
+
|
|
41
|
+
console.log('Sign in successful:', session);
|
|
42
|
+
return {success: true, session};
|
|
43
|
+
} catch (error: any) {
|
|
44
|
+
console.error('Sign in failed:', error.message);
|
|
45
|
+
return {success: false, error: error.message};
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Alternative: sign in with phone
|
|
51
|
+
*/
|
|
52
|
+
const signInWithPhone = async (phone: string, password: string, expires: number = 15) => {
|
|
53
|
+
try {
|
|
54
|
+
const session = await userActions.signIn({
|
|
55
|
+
phone,
|
|
56
|
+
password
|
|
57
|
+
}, expires);
|
|
58
|
+
|
|
59
|
+
console.log('Sign in successful:', session);
|
|
60
|
+
return {success: true, session};
|
|
61
|
+
} catch (error: any) {
|
|
62
|
+
console.error('Sign in failed:', error.message);
|
|
63
|
+
return {success: false, error: error.message};
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
// Export the correct functions
|
|
68
|
+
export {
|
|
69
|
+
signInUser,
|
|
70
|
+
signInWithEmail,
|
|
71
|
+
signInWithPhone
|
|
72
|
+
};
|
|
73
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"noImplicitAny": false,
|
|
5
|
+
"noImplicitThis": false,
|
|
6
|
+
"noUncheckedIndexedAccess": false,
|
|
7
|
+
"noUnusedLocals": false,
|
|
8
|
+
"skipLibCheck": false,
|
|
9
|
+
"strict": false,
|
|
10
|
+
"types": [
|
|
11
|
+
"jest",
|
|
12
|
+
"node"
|
|
13
|
+
],
|
|
14
|
+
},
|
|
15
|
+
"include": [
|
|
16
|
+
"./src/**/*.ts",
|
|
17
|
+
"./src/**/*.tsx",
|
|
18
|
+
"./src/**/*.test.ts",
|
|
19
|
+
"./src/**/*.test.tsx"
|
|
20
|
+
],
|
|
21
|
+
"exclude": [
|
|
22
|
+
"lib",
|
|
23
|
+
"./node_modules"
|
|
24
|
+
]
|
|
25
|
+
}
|