@symbo.ls/create 2.10.42 → 2.10.48
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/define.js +0 -3
- package/index.js +12 -4
- package/package.json +2 -2
package/define.js
CHANGED
|
@@ -22,10 +22,7 @@ export const defaultDefine = {
|
|
|
22
22
|
},
|
|
23
23
|
|
|
24
24
|
__filepath: param => param,
|
|
25
|
-
__collectionCache: param => param,
|
|
26
25
|
$setCollection: Collection.define.$setCollection,
|
|
27
|
-
__stateCollectionCache: param => param,
|
|
28
26
|
$setStateCollection: Collection.define.$setStateCollection,
|
|
29
|
-
__propsCollectionCache: param => param,
|
|
30
27
|
$setPropsCollection: Collection.define.$setPropsCollection
|
|
31
28
|
}
|
package/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import * as domqlUtils from '@domql/utils'
|
|
|
9
9
|
|
|
10
10
|
import * as uikit from '@symbo.ls/uikit'
|
|
11
11
|
import { init } from '@symbo.ls/init'
|
|
12
|
-
import { fetchProject } from '@symbo.ls/fetch'
|
|
12
|
+
import { fetchStateAsync, fetchProject } from '@symbo.ls/fetch'
|
|
13
13
|
|
|
14
14
|
import { emotion as defaultEmotion, createEmotion } from '@symbo.ls/emotion'
|
|
15
15
|
import { defaultDefine } from './define'
|
|
@@ -43,7 +43,7 @@ export const create = async (App, options = defaultOptions) => {
|
|
|
43
43
|
if (appIsKey) App = {}
|
|
44
44
|
if (key && options.editor) {
|
|
45
45
|
try {
|
|
46
|
-
await fetchProject(key, options)
|
|
46
|
+
if (!options.async) await fetchProject(key, options)
|
|
47
47
|
} catch (e) {
|
|
48
48
|
console.error(e)
|
|
49
49
|
}
|
|
@@ -65,7 +65,7 @@ export const create = async (App, options = defaultOptions) => {
|
|
|
65
65
|
...initOptions
|
|
66
66
|
})
|
|
67
67
|
|
|
68
|
-
const
|
|
68
|
+
const domqlApp = DOM.create({
|
|
69
69
|
extend: [App],
|
|
70
70
|
routes: options.pages,
|
|
71
71
|
state: options.state,
|
|
@@ -88,7 +88,15 @@ export const create = async (App, options = defaultOptions) => {
|
|
|
88
88
|
...options.domqlOptions
|
|
89
89
|
})
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
if (key && options.editor) {
|
|
92
|
+
try {
|
|
93
|
+
if (options.editor.async) fetchStateAsync(key, options, domqlApp)
|
|
94
|
+
} catch (e) {
|
|
95
|
+
console.error(e)
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return domqlApp
|
|
92
100
|
}
|
|
93
101
|
|
|
94
102
|
export default create
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/create",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.48",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"gitHead": "
|
|
5
|
+
"gitHead": "7a742abe5f560b0dad41a35a311d0292bc88152e",
|
|
6
6
|
"source": "index.js",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"dependencies": {
|