@seedprotocol/sdk 0.2.1 → 0.2.3
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/Item-D_fRE67b.js +40 -0
- package/dist/Item-D_fRE67b.js.map +1 -0
- package/dist/ItemProperty-l0sNRNKZ.js +2 -0
- package/dist/ItemProperty-l0sNRNKZ.js.map +1 -0
- package/dist/bin.js +35 -3
- package/dist/bin.js.map +1 -1
- package/dist/constants-CtWTDW5q.js +168 -0
- package/dist/constants-CtWTDW5q.js.map +1 -0
- package/dist/{index-DaK2dz5P.js → index-CaMCzFrd.js} +226 -332
- package/dist/index-CaMCzFrd.js.map +1 -0
- package/dist/{index-B5qzD-bs.js → index-DpAde4Hk.js} +6 -8
- package/dist/index-DpAde4Hk.js.map +1 -0
- package/dist/main.js +3 -5
- package/dist/main.js.map +1 -1
- package/dist/node/db/node.app.db.config.ts +2 -2
- package/dist/{seed.schema.config-DIMmvqJf.js → seed.schema.config-DrU0-rhL.js} +7 -9
- package/dist/seed.schema.config-DrU0-rhL.js.map +1 -0
- package/dist/seedSchema/AppStateSchema.ts +10 -0
- package/dist/seedSchema/ConfigSchema.ts +15 -0
- package/dist/seedSchema/MetadataSchema.ts +28 -0
- package/dist/seedSchema/ModelSchema.ts +46 -0
- package/dist/seedSchema/ModelUidSchema.ts +16 -0
- package/dist/seedSchema/PropertyUidSchema.ts +16 -0
- package/dist/seedSchema/SeedSchema.ts +29 -0
- package/dist/seedSchema/VersionSchema.ts +16 -0
- package/dist/seedSchema/index.ts +8 -0
- package/dist/src/ArweaveClientNode.ts +13 -0
- package/dist/src/BaseItem.ts +1 -1
- package/dist/src/BaseItemProperty.ts +1 -1
- package/dist/src/EasClientNode.ts +13 -0
- package/dist/src/FileManagerNode.ts +31 -0
- package/dist/src/IItemProperty.ts +1 -1
- package/dist/src/ItemProperty.ts +0 -16
- package/dist/src/QueryClientNode.ts +24 -0
- package/dist/src/SeedProtocolSdk.d.ts +1 -1
- package/dist/src/client.ts +12 -6
- package/dist/src/create.ts +1 -1
- package/dist/src/fetchDbData.ts +7 -4
- package/dist/src/fetchSeeds.ts +5 -2
- package/dist/src/fetchVersions.ts +5 -2
- package/dist/src/getItem.ts +1 -1
- package/dist/src/getPropertyData.ts +1 -1
- package/dist/src/getPublishPayload.ts +1 -1
- package/dist/src/globalMachine.ts +1 -1
- package/dist/src/hydrateFromDb.ts +1 -1
- package/dist/src/initialize.ts +88 -238
- package/dist/src/itemMachineAll.ts +6 -7
- package/dist/src/node.app.db.config.ts +2 -2
- package/dist/src/preparePublishRequestData.ts +1 -1
- package/dist/src/processItems.ts +5 -2
- package/dist/src/property.ts +2 -2
- package/dist/src/requestAll.ts +1 -1
- package/dist/src/trash.ts +1 -1
- package/dist/types/scripts/bin.d.ts +4 -0
- package/dist/types/scripts/bin.d.ts.map +1 -1
- package/dist/types/src/Item/index.d.ts +5 -0
- package/dist/types/src/Item/index.d.ts.map +1 -0
- package/dist/types/src/ItemProperty/BaseItemProperty.d.ts +1 -1
- package/dist/types/src/ItemProperty/BaseItemProperty.d.ts.map +1 -1
- package/dist/types/src/ItemProperty/index.d.ts +5 -0
- package/dist/types/src/ItemProperty/index.d.ts.map +1 -0
- package/dist/types/src/browser/{item → Item}/Item.d.ts.map +1 -1
- package/dist/types/src/browser/Item/index.d.ts +2 -0
- package/dist/types/src/browser/Item/index.d.ts.map +1 -0
- package/dist/types/src/browser/{item → ItemProperty}/ItemProperty.d.ts +2 -1
- package/dist/types/src/browser/ItemProperty/ItemProperty.d.ts.map +1 -0
- package/dist/types/src/browser/{property → ItemProperty}/index.d.ts +1 -1
- package/dist/types/src/browser/ItemProperty/index.d.ts.map +1 -0
- package/dist/types/src/browser/index.d.ts +2 -3
- package/dist/types/src/browser/index.d.ts.map +1 -1
- package/dist/types/src/browser/react/item.d.ts +1 -1
- package/dist/types/src/browser/react/property.d.ts +1 -1
- package/dist/types/src/browser/react/trash.d.ts +1 -1
- package/dist/types/src/browser/schema/index.d.ts +2 -2
- package/dist/types/src/browser/schema/index.d.ts.map +1 -1
- package/dist/types/src/browser/schema/model/index.d.ts +1 -1
- package/dist/types/src/{browser/client.d.ts → client.d.ts} +1 -1
- package/dist/types/src/client.d.ts.map +1 -0
- package/dist/types/src/db/read/getPublishPayload.d.ts +1 -1
- package/dist/types/src/helpers/constants.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +4 -4
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/interfaces/IItemProperty.d.ts +1 -1
- package/dist/types/src/interfaces/IItemProperty.d.ts.map +1 -1
- package/dist/types/src/node/{item → Item}/Item.d.ts.map +1 -1
- package/dist/types/src/node/ItemProperty/ItemProperty.d.ts +1 -0
- package/dist/types/src/node/ItemProperty/ItemProperty.d.ts.map +1 -0
- package/dist/types/src/node/helpers/ArweaveClientNode.d.ts +7 -0
- package/dist/types/src/node/helpers/ArweaveClientNode.d.ts.map +1 -0
- package/dist/types/src/node/helpers/EasClientNode.d.ts +7 -0
- package/dist/types/src/node/helpers/EasClientNode.d.ts.map +1 -0
- package/dist/types/src/node/helpers/FileManagerNode.d.ts +9 -0
- package/dist/types/src/node/helpers/FileManagerNode.d.ts.map +1 -0
- package/dist/types/src/node/helpers/QueryClientNode.d.ts +9 -0
- package/dist/types/src/node/helpers/QueryClientNode.d.ts.map +1 -0
- package/dist/types/src/services/allItems/actors/fetchDbData.d.ts +4 -0
- package/dist/types/src/services/allItems/actors/fetchDbData.d.ts.map +1 -0
- package/dist/types/src/services/allItems/actors/fetchRelatedItems.d.ts.map +1 -0
- package/dist/types/src/services/allItems/actors/fetchSeeds.d.ts +4 -0
- package/dist/types/src/services/allItems/actors/fetchSeeds.d.ts.map +1 -0
- package/dist/types/src/services/allItems/actors/fetchVersions.d.ts +4 -0
- package/dist/types/src/services/allItems/actors/fetchVersions.d.ts.map +1 -0
- package/dist/types/src/services/allItems/actors/initialize.d.ts.map +1 -0
- package/dist/types/src/services/allItems/actors/processItems.d.ts +4 -0
- package/dist/types/src/services/allItems/actors/processItems.d.ts.map +1 -0
- package/dist/types/src/services/allItems/itemMachineAll.d.ts +67 -0
- package/dist/types/src/services/allItems/itemMachineAll.d.ts.map +1 -0
- package/dist/types/src/types/item.d.ts +5 -5
- package/dist/types/src/types/item.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/constants-B6s6tGup.js +0 -65
- package/dist/constants-B6s6tGup.js.map +0 -1
- package/dist/index-B5qzD-bs.js.map +0 -1
- package/dist/index-DaK2dz5P.js.map +0 -1
- package/dist/seed.schema.config-DIMmvqJf.js.map +0 -1
- package/dist/src/init.ts +0 -61
- package/dist/types/src/browser/client.d.ts.map +0 -1
- package/dist/types/src/browser/item/ItemProperty.d.ts.map +0 -1
- package/dist/types/src/browser/item/all/actors/fetchDbData.d.ts +0 -2
- package/dist/types/src/browser/item/all/actors/fetchDbData.d.ts.map +0 -1
- package/dist/types/src/browser/item/all/actors/fetchRelatedItems.d.ts.map +0 -1
- package/dist/types/src/browser/item/all/actors/fetchSeeds.d.ts +0 -2
- package/dist/types/src/browser/item/all/actors/fetchSeeds.d.ts.map +0 -1
- package/dist/types/src/browser/item/all/actors/fetchVersions.d.ts +0 -2
- package/dist/types/src/browser/item/all/actors/fetchVersions.d.ts.map +0 -1
- package/dist/types/src/browser/item/all/actors/initialize.d.ts.map +0 -1
- package/dist/types/src/browser/item/all/actors/processItems.d.ts +0 -2
- package/dist/types/src/browser/item/all/actors/processItems.d.ts.map +0 -1
- package/dist/types/src/browser/item/all/itemMachineAll.d.ts +0 -2
- package/dist/types/src/browser/item/all/itemMachineAll.d.ts.map +0 -1
- package/dist/types/src/browser/item/index.d.ts +0 -3
- package/dist/types/src/browser/item/index.d.ts.map +0 -1
- package/dist/types/src/browser/property/index.d.ts.map +0 -1
- package/dist/types/src/init.d.ts +0 -6
- package/dist/types/src/init.d.ts.map +0 -1
- package/dist/types/src/seed.d.ts +0 -1
- package/dist/types/src/seed.d.ts.map +0 -1
- /package/dist/types/src/browser/{item → Item}/Item.d.ts +0 -0
- /package/dist/types/src/node/{item → Item}/Item.d.ts +0 -0
- /package/dist/types/src/{browser/item/all → services/allItems}/actors/fetchRelatedItems.d.ts +0 -0
- /package/dist/types/src/{browser/item/all → services/allItems}/actors/initialize.d.ts +0 -0
package/dist/src/initialize.ts
CHANGED
|
@@ -1,277 +1,127 @@
|
|
|
1
|
-
import { EventObject, fromCallback } from 'xstate'
|
|
2
|
-
import {
|
|
3
|
-
import pluralize from 'pluralize'
|
|
4
|
-
import { BaseEasClient } from '@/helpers/BaseEasClient'
|
|
5
|
-
import { BaseQueryClient } from '@/helpers/BaseQueryClient'
|
|
6
|
-
import { toSnakeCase } from '@/helpers'
|
|
1
|
+
import { EventObject, fromCallback, Subscription } from 'xstate'
|
|
2
|
+
import { isNode, isReactNative } from '@/shared'
|
|
7
3
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
import {
|
|
14
|
-
import { SchemaWhereInput } from '@/graphql/gql/graphql'
|
|
15
|
-
import { INTERNAL_DATA_TYPES } from '@/helpers/constants'
|
|
16
|
-
import { getAddressesFromDb } from '@/helpers/db'
|
|
17
|
-
import { eventEmitter } from '@/eventBus'
|
|
4
|
+
GLOBAL_INITIALIZING_CREATE_ALL_ITEMS_SERVICES,
|
|
5
|
+
GLOBAL_INITIALIZING_INTERNAL_SERVICE_READY,
|
|
6
|
+
GLOBAL_INITIALIZING_SEND_CONFIG,
|
|
7
|
+
} from '@/services/internal/constants'
|
|
8
|
+
import debug from 'debug'
|
|
9
|
+
import { FromCallbackInput, GlobalMachineContext } from '@/types'
|
|
18
10
|
import { BaseDb } from '@/db/BaseDb'
|
|
11
|
+
import { appState } from '@/seedSchema'
|
|
12
|
+
import { like } from 'drizzle-orm'
|
|
13
|
+
import { fetchSchemaUids } from '@/stores/eas'
|
|
19
14
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const easClient = BaseEasClient.getEasClient()
|
|
23
|
-
const queryClient = BaseQueryClient.getQueryClient()
|
|
24
|
-
|
|
25
|
-
type Times = {
|
|
26
|
-
initialize?: {
|
|
27
|
-
start: number | null
|
|
28
|
-
end: number | null
|
|
29
|
-
}
|
|
30
|
-
fetchDbData?: {
|
|
31
|
-
start: number | null
|
|
32
|
-
end: number | null
|
|
33
|
-
}
|
|
34
|
-
fetchSeeds?: {
|
|
35
|
-
start: number | null
|
|
36
|
-
end: number | null
|
|
37
|
-
}
|
|
38
|
-
fetchVersions?: {
|
|
39
|
-
start: number | null
|
|
40
|
-
end: number | null
|
|
41
|
-
}
|
|
42
|
-
fetchRelatedItems?: {
|
|
43
|
-
start: number | null
|
|
44
|
-
end: number | null
|
|
45
|
-
}
|
|
46
|
-
processItems?: {
|
|
47
|
-
start: number | null
|
|
48
|
-
end: number | null
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
type InternalDataType = keyof typeof INTERNAL_DATA_TYPES;
|
|
15
|
+
const logger = debug('app:services:global:actors:initialize')
|
|
53
16
|
|
|
54
17
|
export const initialize = fromCallback<
|
|
55
18
|
EventObject,
|
|
56
|
-
FromCallbackInput<
|
|
57
|
-
>(({ sendBack, input: { context } }) => {
|
|
58
|
-
const {
|
|
59
|
-
|
|
60
|
-
const newTimes: Times = {
|
|
61
|
-
initialize: {
|
|
62
|
-
start: Date.now(),
|
|
63
|
-
end: null,
|
|
64
|
-
},
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
let modelNameLowercase: string | undefined
|
|
68
|
-
let modelNamePlural: string | undefined
|
|
69
|
-
let queryVariables: Record<string, unknown> | undefined
|
|
70
|
-
let appDb
|
|
19
|
+
FromCallbackInput<GlobalMachineContext, EventObject>
|
|
20
|
+
>(({ sendBack, input: { event, context } }) => {
|
|
21
|
+
const { internalService, models, endpoints, arweaveDomain } = context
|
|
71
22
|
|
|
72
|
-
const
|
|
73
|
-
appDb = BaseDb.getAppDb()
|
|
23
|
+
const { addresses } = event
|
|
74
24
|
|
|
75
|
-
|
|
76
|
-
//
|
|
77
|
-
// if (rows && rows.length > 0) {
|
|
78
|
-
// for (const itemData of rows) {
|
|
79
|
-
// const {
|
|
80
|
-
// versionLocalId,
|
|
81
|
-
// versionUid,
|
|
82
|
-
// createdAt,
|
|
83
|
-
// seedLocalId,
|
|
84
|
-
// seedUid,
|
|
85
|
-
// attestationCreatedAt,
|
|
86
|
-
// } = itemData
|
|
87
|
-
//
|
|
88
|
-
// eventEmitter.emit('item.create.request', {
|
|
89
|
-
// itemData: {
|
|
90
|
-
// versionLocalId,
|
|
91
|
-
// versionUid,
|
|
92
|
-
// createdAt,
|
|
93
|
-
// seedLocalId,
|
|
94
|
-
// seedUid,
|
|
95
|
-
// attestationCreatedAt,
|
|
96
|
-
// },
|
|
97
|
-
// ModelClass,
|
|
98
|
-
// })
|
|
99
|
-
// }
|
|
100
|
-
// }
|
|
25
|
+
let environment = 'browser'
|
|
101
26
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
const modelSchemas = await queryClient.fetchQuery({
|
|
106
|
-
queryKey: [`getSchemas${modelName}`],
|
|
107
|
-
queryFn: async () =>
|
|
108
|
-
easClient.request(GET_SCHEMAS, {
|
|
109
|
-
where: {
|
|
110
|
-
schema: {
|
|
111
|
-
equals: `bytes32 ${toSnakeCase(modelName)}`,
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
}),
|
|
115
|
-
})
|
|
27
|
+
if (isNode()) {
|
|
28
|
+
environment = 'node'
|
|
29
|
+
}
|
|
116
30
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
modelSchemas.schemas.length === 0
|
|
121
|
-
) {
|
|
122
|
-
throw new Error(`No schema found for ${modelName}`)
|
|
123
|
-
}
|
|
31
|
+
if (isReactNative()) {
|
|
32
|
+
environment = 'react-native'
|
|
33
|
+
}
|
|
124
34
|
|
|
125
|
-
|
|
35
|
+
let internalSubscription: Subscription | undefined
|
|
36
|
+
let easSubscription: Subscription | undefined
|
|
126
37
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
)
|
|
38
|
+
if (environment === 'browser' && models) {
|
|
39
|
+
const _initFileSystem = async (): Promise<void> => {
|
|
40
|
+
return
|
|
41
|
+
// return new Promise((resolve) => {
|
|
42
|
+
// })
|
|
131
43
|
}
|
|
132
44
|
|
|
133
|
-
const
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
45
|
+
const _initInternal = async (): Promise<void> => {
|
|
46
|
+
return new Promise((resolve) => {
|
|
47
|
+
internalSubscription = internalService.subscribe((snapshot) => {
|
|
48
|
+
logger('[sdk] [internal] snapshot', snapshot)
|
|
49
|
+
if (snapshot.value === 'ready') {
|
|
50
|
+
resolve()
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
internalService.send({
|
|
54
|
+
type: 'init',
|
|
55
|
+
endpoints,
|
|
56
|
+
addresses,
|
|
57
|
+
arweaveDomain,
|
|
58
|
+
})
|
|
138
59
|
})
|
|
139
|
-
.from(modelsTable)
|
|
140
|
-
.leftJoin(modelUids, eq(modelsTable.id, modelUids.modelId))
|
|
141
|
-
.where(eq(modelsTable.name, modelName))
|
|
142
|
-
.limit(1)
|
|
143
|
-
|
|
144
|
-
const foundModel = foundModels[0]
|
|
145
|
-
|
|
146
|
-
if (!foundModel) {
|
|
147
|
-
sendBack({ type: 'modelNotFound', modelName })
|
|
148
|
-
return
|
|
149
60
|
}
|
|
150
61
|
|
|
151
|
-
|
|
152
|
-
.
|
|
153
|
-
.values({
|
|
154
|
-
modelId: foundModel.id,
|
|
155
|
-
uid: modelSchema.id,
|
|
156
|
-
})
|
|
157
|
-
.onConflictDoNothing()
|
|
62
|
+
const _initAllItemsServices = async (): Promise<void> => {
|
|
63
|
+
const appDb = BaseDb.getAppDb()
|
|
158
64
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
dataType: properties.dataType,
|
|
164
|
-
uid: propertyUids.uid,
|
|
165
|
-
})
|
|
166
|
-
.from(properties)
|
|
167
|
-
.fullJoin(propertyUids, eq(properties.id, propertyUids.propertyId))
|
|
168
|
-
.where(eq(properties.modelId, foundModel.id))
|
|
65
|
+
const rows = await appDb
|
|
66
|
+
.select()
|
|
67
|
+
.from(appState)
|
|
68
|
+
.where(like(appState.key, 'snapshot__%'))
|
|
169
69
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
OR: [],
|
|
174
|
-
},
|
|
70
|
+
const payloadObj = {
|
|
71
|
+
create: {},
|
|
72
|
+
restore: {},
|
|
175
73
|
}
|
|
176
74
|
|
|
177
|
-
|
|
178
|
-
if (foundPropertyDb.name && foundPropertyDb.dataType) {
|
|
179
|
-
const easDatatype = INTERNAL_DATA_TYPES[foundPropertyDb.dataType as InternalDataType].eas
|
|
75
|
+
const modelNamesRestored: string[] = []
|
|
180
76
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
queryVariables.where.OR!.push({
|
|
188
|
-
schema: {
|
|
189
|
-
equals: `${easDatatype} ${easPropertyName}`,
|
|
190
|
-
},
|
|
191
|
-
})
|
|
77
|
+
if (rows && rows.length > 0) {
|
|
78
|
+
for (const row of rows) {
|
|
79
|
+
const modelName = row.key.replace('snapshot__', '')
|
|
80
|
+
payloadObj.restore[modelName] = JSON.parse(row.value)
|
|
81
|
+
modelNamesRestored.push(modelName)
|
|
192
82
|
}
|
|
193
83
|
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
queryFn: async () => easClient.request(GET_SCHEMAS, queryVariables),
|
|
198
|
-
})
|
|
199
|
-
|
|
200
|
-
const tempExclusions = ['html', 'json']
|
|
201
|
-
|
|
202
|
-
for (const foundProperty of foundPropertiesDb) {
|
|
203
|
-
if (tempExclusions.includes(foundProperty.name)) {
|
|
204
|
-
continue
|
|
205
|
-
}
|
|
206
|
-
const easDatatype = INTERNAL_DATA_TYPES[foundProperty.dataType as InternalDataType].eas
|
|
207
|
-
|
|
208
|
-
let easPropertyName = toSnakeCase(foundProperty.name)
|
|
209
|
-
|
|
210
|
-
if (foundProperty.dataType === 'Relation') {
|
|
211
|
-
easPropertyName += '_id'
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
const regex = new RegExp(`${easDatatype} ${easPropertyName}`)
|
|
215
|
-
const propertySchema = foundPropertySchemas.schemas.find((s) =>
|
|
216
|
-
regex.test(s.schema),
|
|
217
|
-
)
|
|
218
|
-
|
|
219
|
-
if (!propertySchema) {
|
|
220
|
-
// TODO: We should create the schema here?
|
|
221
|
-
continue
|
|
84
|
+
for (const [modelName, ModelClass] of Object.entries(models)) {
|
|
85
|
+
if (!modelNamesRestored.includes(modelName)) {
|
|
86
|
+
payloadObj.create[modelName] = ModelClass
|
|
222
87
|
}
|
|
223
|
-
await appDb
|
|
224
|
-
.insert(propertyUids)
|
|
225
|
-
.values({
|
|
226
|
-
propertyId: foundProperty.id,
|
|
227
|
-
uid: propertySchema.id,
|
|
228
|
-
})
|
|
229
|
-
.onConflictDoNothing()
|
|
230
88
|
}
|
|
89
|
+
sendBack({
|
|
90
|
+
type: GLOBAL_INITIALIZING_CREATE_ALL_ITEMS_SERVICES,
|
|
91
|
+
...payloadObj,
|
|
92
|
+
})
|
|
231
93
|
}
|
|
232
94
|
|
|
233
|
-
const
|
|
234
|
-
|
|
235
|
-
queryVariables = {
|
|
236
|
-
where: {
|
|
237
|
-
attester: {
|
|
238
|
-
in: addresses,
|
|
239
|
-
},
|
|
240
|
-
schemaId: {
|
|
241
|
-
equals: modelSchema.id,
|
|
242
|
-
},
|
|
243
|
-
decodedDataJson: {
|
|
244
|
-
contains: modelSchema.id,
|
|
245
|
-
},
|
|
246
|
-
},
|
|
95
|
+
const _initEas = async (): Promise<void> => {
|
|
96
|
+
await fetchSchemaUids()
|
|
247
97
|
}
|
|
248
|
-
}
|
|
249
98
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
sendBack({
|
|
253
|
-
type: 'initializeSuccess',
|
|
254
|
-
modelName,
|
|
255
|
-
modelNameLowercase,
|
|
256
|
-
modelNamePlural,
|
|
257
|
-
queryVariables,
|
|
258
|
-
})
|
|
259
|
-
newTimes!.initialize!.end = Date.now()
|
|
260
|
-
sendBack({ type: 'updateTimes', times: newTimes })
|
|
99
|
+
_initFileSystem().then(() => {
|
|
100
|
+
logger('[global/actors] File system initialized')
|
|
261
101
|
})
|
|
262
|
-
}
|
|
263
102
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
103
|
+
_initInternal()
|
|
104
|
+
.then(() => {
|
|
105
|
+
return _initAllItemsServices()
|
|
106
|
+
})
|
|
107
|
+
.then(() => {
|
|
108
|
+
return _initEas()
|
|
109
|
+
})
|
|
110
|
+
.then(() => {
|
|
111
|
+
logger('[global/actors] Internal initialized')
|
|
112
|
+
sendBack({ type: GLOBAL_INITIALIZING_INTERNAL_SERVICE_READY })
|
|
113
|
+
internalSubscription?.unsubscribe()
|
|
114
|
+
})
|
|
267
115
|
|
|
268
|
-
|
|
269
|
-
|
|
116
|
+
// _initEas().then(() => {
|
|
117
|
+
// logger('EAS initialized')
|
|
118
|
+
// })
|
|
270
119
|
}
|
|
271
120
|
|
|
272
|
-
|
|
121
|
+
sendBack({ type: GLOBAL_INITIALIZING_SEND_CONFIG, environment })
|
|
273
122
|
|
|
274
123
|
return () => {
|
|
275
|
-
|
|
124
|
+
internalSubscription?.unsubscribe()
|
|
125
|
+
easSubscription?.unsubscribe()
|
|
276
126
|
}
|
|
277
127
|
})
|
|
@@ -2,14 +2,13 @@ import { assign, setup } from 'xstate'
|
|
|
2
2
|
import { MachineIds } from '@/services/internal/constants'
|
|
3
3
|
import { AllItemsMachineContext } from '@/types'
|
|
4
4
|
import { eventEmitter } from '@/eventBus'
|
|
5
|
-
import { initialize } from '
|
|
6
|
-
import { fetchDbData } from '
|
|
7
|
-
import { fetchSeeds } from '
|
|
8
|
-
import { fetchVersions } from '
|
|
9
|
-
import { fetchRelatedItems } from '
|
|
10
|
-
import { processItems } from '
|
|
5
|
+
import { initialize } from '../allItems/actors/initialize'
|
|
6
|
+
import { fetchDbData } from '../allItems/actors/fetchDbData'
|
|
7
|
+
import { fetchSeeds } from '../allItems/actors/fetchSeeds'
|
|
8
|
+
import { fetchVersions } from '../allItems/actors/fetchVersions'
|
|
9
|
+
import { fetchRelatedItems } from '../allItems/actors/fetchRelatedItems'
|
|
10
|
+
import { processItems } from '../allItems/actors/processItems'
|
|
11
11
|
|
|
12
|
-
const excludedVersionUidValues = ['', 'undefined', 'null', '0', 0]
|
|
13
12
|
|
|
14
13
|
export const itemMachineAll = setup({
|
|
15
14
|
types: {
|
|
@@ -24,10 +24,10 @@ if (process.env.IS_SEED_DEV) {
|
|
|
24
24
|
)
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
let schemaDir = `${sdkRoot}/dist/
|
|
27
|
+
let schemaDir = `${sdkRoot}/dist/seedSchema/*.ts`
|
|
28
28
|
|
|
29
29
|
if (process.env.IS_SEED_DEV) {
|
|
30
|
-
schemaDir = `${sdkRoot}/
|
|
30
|
+
schemaDir = `${sdkRoot}/seedSchema/*.ts`
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
export default defineConfig({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventObject, fromCallback } from 'xstate'
|
|
2
2
|
import { FromCallbackInput, PublishMachineContext } from '@/types'
|
|
3
|
-
import { Item } from '@/browser/
|
|
3
|
+
import { Item } from '@/browser/Item'
|
|
4
4
|
import { models as modelsTable, modelUids } from '@/seedSchema'
|
|
5
5
|
import { BaseDb } from '@/db/BaseDb'
|
|
6
6
|
import { eq } from 'drizzle-orm'
|
package/dist/src/processItems.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { EventObject, fromCallback } from 'xstate'
|
|
2
|
-
import {
|
|
2
|
+
import { AllItemsMachineContext, FromCallbackInput } from '@/types'
|
|
3
3
|
import { Attestation } from '@/graphql/gql/graphql'
|
|
4
4
|
import { eventEmitter } from '@/eventBus'
|
|
5
5
|
|
|
6
|
-
export const processItems = fromCallback<
|
|
6
|
+
export const processItems = fromCallback<
|
|
7
|
+
EventObject,
|
|
8
|
+
FromCallbackInput<EventObject, AllItemsMachineContext>
|
|
9
|
+
>(
|
|
7
10
|
({ sendBack, input: { context } }) => {
|
|
8
11
|
const {
|
|
9
12
|
itemVersions,
|
package/dist/src/property.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useImmer } from 'use-immer'
|
|
2
|
-
import { Item } from '@/browser/
|
|
2
|
+
import { Item } from '@/browser/Item'
|
|
3
3
|
import { useCallback, useEffect, useRef, useState } from 'react'
|
|
4
4
|
import { useSelector } from '@xstate/react'
|
|
5
5
|
import debug from 'debug'
|
|
6
6
|
import { eventEmitter } from '@/eventBus'
|
|
7
|
-
import { ItemProperty } from '@/browser/
|
|
7
|
+
import { ItemProperty } from '@/browser/ItemProperty/ItemProperty'
|
|
8
8
|
import { useGlobalServiceStatus } from '@/browser/react/services'
|
|
9
9
|
import { IItemProperty } from '@/interfaces'
|
|
10
10
|
|
package/dist/src/requestAll.ts
CHANGED
package/dist/src/trash.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import '../src/node/helpers/EasClientNode';
|
|
3
|
+
import '../src/node/helpers/QueryClientNode';
|
|
4
|
+
import '../src/node/helpers/FileManagerNode';
|
|
5
|
+
import '../src/node/helpers/ArweaveClientNode';
|
|
2
6
|
declare const init: (args: string[]) => void;
|
|
3
7
|
export { init };
|
|
4
8
|
//# sourceMappingURL=bin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../../../scripts/bin.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../../../scripts/bin.ts"],"names":[],"mappings":";AAOA,OAAO,mCAAmC,CAAA;AAC1C,OAAO,qCAAqC,CAAA;AAC5C,OAAO,qCAAqC,CAAA;AAC5C,OAAO,uCAAuC,CAAA;AAoB9C,QAAA,MAAM,IAAI,SAAU,MAAM,EAAE,SA+I3B,CAAA;AAeD,OAAO,EAAE,IAAI,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Item/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAEpC,QAAA,IAAI,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,SAAS,CAAA;AAGhC,eAAO,MAAM,QAAQ,qBAOpB,CAAA;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ActorRefFrom, Subscription } from 'xstate';
|
|
2
2
|
import { BehaviorSubject, Subscriber } from 'rxjs';
|
|
3
3
|
import { Static } from '@sinclair/typebox';
|
|
4
|
-
import { TProperty } from '@/browser/
|
|
4
|
+
import { TProperty } from '@/browser/ItemProperty';
|
|
5
5
|
import { IItemProperty } from '@/interfaces/IItemProperty';
|
|
6
6
|
import { immerable } from 'immer';
|
|
7
7
|
import { CreatePropertyInstanceProps, PropertyMachineContext } from '@/types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseItemProperty.d.ts","sourceRoot":"","sources":["../../../../src/ItemProperty/BaseItemProperty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA6B,YAAY,EAAW,MAAM,QAAQ,CAAA;AACvF,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC1C,OAAO,EAAgB,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"BaseItemProperty.d.ts","sourceRoot":"","sources":["../../../../src/ItemProperty/BaseItemProperty.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ItemProperty/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAE5C,QAAA,IAAI,YAAY,EAAE,aAAa,CAAC,GAAG,CAAC,GAAG,SAAS,CAAA;AAGhD,eAAO,MAAM,gBAAgB,qBAO5B,CAAA;AAED,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../../../../src/browser/
|
|
1
|
+
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../../../../src/browser/Item/Item.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,WAAW,EACX,YAAY,EACb,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAEpC,qBAAa,IAAI,CAAC,CAAC,SAAS,WAAW,CAAC,WAAW,CAAC,CAAE,SAAQ,QAAQ,CAAC,CAAC,CAAE,YAAW,KAAK,CAAC,CAAC,CAAC;gBAE/E,aAAa,EAAE,YAAY,CAAC,CAAC,CAAC;CAI3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/browser/Item/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { CreatePropertyInstanceProps, PropertyType } from '@/types';
|
|
2
2
|
import { IItemProperty } from '@/interfaces/IItemProperty';
|
|
3
3
|
import { BaseItemProperty } from '@/ItemProperty/BaseItemProperty';
|
|
4
|
-
|
|
4
|
+
declare class ItemProperty extends BaseItemProperty<PropertyType> implements IItemProperty<PropertyType> {
|
|
5
5
|
constructor(initialValues: Partial<CreatePropertyInstanceProps>);
|
|
6
6
|
}
|
|
7
|
+
export { ItemProperty };
|
|
7
8
|
//# sourceMappingURL=ItemProperty.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ItemProperty.d.ts","sourceRoot":"","sources":["../../../../../src/browser/ItemProperty/ItemProperty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAGlE,cAAM,YAAa,SAAQ,gBAAgB,CAAC,YAAY,CAAE,YAAW,aAAa,CAAC,YAAY,CAAC;gBAGlF,aAAa,EAAE,OAAO,CAAC,2BAA2B,CAAC;CAIhE;AAID,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Static } from '@sinclair/typebox';
|
|
2
2
|
import { PropertyDataType, PropertyDefs, StorageType } from '@/types';
|
|
3
|
-
export * from '
|
|
3
|
+
export * from './ItemProperty';
|
|
4
4
|
export declare const TPropertyDataType: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"Text">, import("@sinclair/typebox").TLiteral<"Number">, import("@sinclair/typebox").TLiteral<"List">, import("@sinclair/typebox").TLiteral<"Relation">, import("@sinclair/typebox").TLiteral<"ImageSrc">, import("@sinclair/typebox").TLiteral<"FileSrc">, import("@sinclair/typebox").TLiteral<"Json">, import("@sinclair/typebox").TLiteral<"Blob">]>;
|
|
5
5
|
export declare const TStorageType: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"ItemStorage">, import("@sinclair/typebox").TLiteral<"PropertyStorage">]>;
|
|
6
6
|
export declare const TProperty: import("@sinclair/typebox").TObject<{
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/browser/ItemProperty/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAQ,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAErE,cAAc,gBAAgB,CAAA;AAE9B,eAAO,MAAM,iBAAiB,maAS5B,CAAA;AAEF,eAAO,MAAM,YAAY,oJAGvB,CAAA;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;EAWpB,CAAA;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;GAOhC,CAAA;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGzB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,YA0BtB,CAAA;AAED,eAAO,MAAM,mBAAmB,eAAqB,CAAA;AAErD,eAAO,MAAM,mBAAmB,iBAAkB,MAAM,CAAC,OAAO,SAAS,CAAC,4BACjC,GAAG,eAAe,MAAM,SAoBhE,CAAA;AAED,eAAO,MAAM,IAAI,iBACD,WAAW,WAChB,MAAM,mBACE,MAAM,4BAzBgB,GAAG,eAAe,MAAM,SA0BW,CAAA;AAC5E,eAAO,MAAM,MAAM,+BA3BsB,GAAG,eAAe,MAAM,SA2BC,CAAA;AAClE,eAAO,MAAM,IAAI,+BA5BwB,GAAG,eAAe,MAAM,SA4BH,CAAA;AAC9D,eAAO,MAAM,IAAI,+BA7BwB,GAAG,eAAe,MAAM,SA6BH,CAAA;AAC9D,eAAO,MAAM,QAAQ,+BA9BoB,GAAG,eAAe,MAAM,SA8BK,CAAA;AACtE,eAAO,MAAM,QAAQ,QAAS,MAAM,iBAAiB,gBAAgB,4BA/B5B,GAAG,eAAe,MAAM,SAgCN,CAAA;AAC3D,eAAO,MAAM,IAAI,QAAS,MAAM,gBAAgB,gBAAgB,4BAjCvB,GAAG,eAAe,MAAM,SAkCX,CAAA"}
|
|
@@ -2,7 +2,6 @@ export * from './db';
|
|
|
2
2
|
export * from './react';
|
|
3
3
|
export * from '../services';
|
|
4
4
|
export * from './schema';
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './client';
|
|
5
|
+
export * from './Item';
|
|
6
|
+
export * from './ItemProperty';
|
|
8
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/browser/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAA;AACpB,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/browser/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAA;AACpB,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,gBAAgB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/browser/schema/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAA;AAEzB,cAAc,SAAS,CAAA;AACvB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/browser/schema/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAA;AAEzB,cAAc,SAAS,CAAA;AACvB,cAAc,iBAAiB,CAAA;AAE/B,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModelConstructor, ModelValues } from '@/types';
|
|
2
|
-
import { Item } from '../../
|
|
2
|
+
import { Item } from '../../Item';
|
|
3
3
|
export declare const TModelValues: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TAny>;
|
|
4
4
|
export declare const TModelSchema: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
5
5
|
id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ModelClassType, SeedConstructorOptions } from '@/types';
|
|
2
2
|
declare const client: {
|
|
3
|
-
init: ({ config, addresses }: SeedConstructorOptions) => void
|
|
3
|
+
init: ({ config, addresses }: Promise<SeedConstructorOptions>) => Promise<void>;
|
|
4
4
|
subscribe: (callback: any) => {
|
|
5
5
|
unsubscribe: () => void;
|
|
6
6
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/client.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAYhE,QAAA,MAAM,MAAM;kCAC0B,OAAO,CAAC,sBAAsB,CAAC;0BAqC7C,GAAG;;;qBAcR,MAAM,YAAY,GAAG;;;;0BAqBhB,MAAM;qBAGb,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC;yBAG1B,MAAM,EAAE;CAG5B,CAAA;AAED,OAAO,EAAE,MAAM,EAAE,CAAA"}
|