startupjs 0.55.0-alpha.9 → 0.55.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/app/server.js +1 -1
- package/backend.js +1 -0
- package/bundler/helpers.js +1 -0
- package/cli.js +1 -1
- package/i18n/model.js +1 -1
- package/i18n/server.js +1 -1
- package/init/server.js +1 -0
- package/nconf.js +1 -1
- package/package.json +15 -15
- package/server.js +1 -0
- package/startupjs.config.cjs +0 -8
- package/templates/routing/server/index.js +5 -5
- package/templates/simple/.eslintrc.json +12 -17
- package/templates/simple/Dockerfile +1 -1
- package/templates/simple/model/TestThingModel.js +1 -1
- package/templates/simple/model/index.js +1 -1
- package/templates/simple/server/api/index.js +1 -1
- package/templates/simple/server/index.js +4 -4
- package/templates/simple/tsconfig.json +1 -2
- package/templates/ui/Root/index.jsx +6 -12
- package/templates/ui/model/TestThingModel.js +1 -1
- package/templates/ui/model/index.js +2 -2
- package/templates/ui/server/index.js +7 -7
- package/bundler/babel.config.cjs +0 -1
- package/bundler/helpers.cjs +0 -1
- package/bundler/react-native.config.cjs +0 -1
- package/bundler/vite.config.cjs +0 -1
- package/bundler/webpack.server.config.cjs +0 -1
- package/bundler.cjs +0 -39
- package/templates/simple/react-native.config.js +0 -6
- package/templates/simple/vite.config.mjs +0 -9
- package/templates/simple/webpack.server.config.cjs +0 -6
- package/templates/ui/startupjs.config.cjs +0 -3
- /package/{init.js → init/index.js} +0 -0
- /package/templates/simple/{babel.config.js → babel.config.cjs} +0 -0
package/app/server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@startupjs/app/server'
|
|
1
|
+
export * from '@startupjs/app/server/index.js'
|
package/backend.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@startupjs/bundler/helpers.js'
|
package/cli.js
CHANGED
package/i18n/model.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@startupjs/i18n/model'
|
|
1
|
+
export { default } from '@startupjs/i18n/model/index.js'
|
package/i18n/server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@startupjs/i18n/server'
|
|
1
|
+
export * from '@startupjs/i18n/server/index.js'
|
package/init/server.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '@startupjs/init/server.js'
|
package/nconf.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@startupjs/server/nconf'
|
|
1
|
+
export { default } from '@startupjs/server/nconf.js'
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "startupjs",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.55.0
|
|
4
|
+
"version": "0.55.0",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">= 14"
|
|
7
7
|
},
|
|
@@ -10,21 +10,21 @@
|
|
|
10
10
|
"bin": "./cli.js",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@startupjs/app": "^0.55.0
|
|
14
|
-
"@startupjs/backend": "^0.55.0
|
|
15
|
-
"@startupjs/bundler": "^0.55.0
|
|
16
|
-
"@startupjs/cli": "^0.55.0
|
|
13
|
+
"@startupjs/app": "^0.55.0",
|
|
14
|
+
"@startupjs/backend": "^0.55.0",
|
|
15
|
+
"@startupjs/bundler": "^0.55.0",
|
|
16
|
+
"@startupjs/cli": "^0.55.0",
|
|
17
17
|
"@startupjs/docker": "^0.54.0",
|
|
18
|
-
"@startupjs/hooks": "^0.55.0
|
|
19
|
-
"@startupjs/i18n": "^0.55.0
|
|
20
|
-
"@startupjs/init": "^0.55.0
|
|
21
|
-
"@startupjs/isomorphic-helpers": "^0.55.0
|
|
22
|
-
"@startupjs/orm": "^0.55.0
|
|
23
|
-
"@startupjs/patches": "^0.55.0
|
|
24
|
-
"@startupjs/react-sharedb": "^0.55.0
|
|
25
|
-
"@startupjs/server": "^0.55.0
|
|
26
|
-
"babel-preset-startupjs": "^0.55.0
|
|
18
|
+
"@startupjs/hooks": "^0.55.0",
|
|
19
|
+
"@startupjs/i18n": "^0.55.0",
|
|
20
|
+
"@startupjs/init": "^0.55.0",
|
|
21
|
+
"@startupjs/isomorphic-helpers": "^0.55.0",
|
|
22
|
+
"@startupjs/orm": "^0.55.0",
|
|
23
|
+
"@startupjs/patches": "^0.55.0",
|
|
24
|
+
"@startupjs/react-sharedb": "^0.55.0",
|
|
25
|
+
"@startupjs/server": "^0.55.0",
|
|
26
|
+
"babel-preset-startupjs": "^0.55.0",
|
|
27
27
|
"react-native-web": "^0.18.0"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "96bd7446a242b5c096b03a25a99e8a1fae3bb9a7"
|
|
30
30
|
}
|
package/server.js
CHANGED
package/startupjs.config.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import init from 'startupjs/init'
|
|
2
|
-
import startupjsServer from 'startupjs/server'
|
|
3
|
-
import { initApp } from 'startupjs/app/server'
|
|
4
|
-
import orm from '../model'
|
|
5
|
-
import api from './api'
|
|
1
|
+
import init from 'startupjs/init/server.js'
|
|
2
|
+
import startupjsServer from 'startupjs/server.js'
|
|
3
|
+
import { initApp } from 'startupjs/app/server.js'
|
|
4
|
+
import orm from '../model/index.js'
|
|
5
|
+
import api from './api/index.js'
|
|
6
6
|
|
|
7
7
|
// Init startupjs ORM.
|
|
8
8
|
init({ orm })
|
|
@@ -3,39 +3,34 @@
|
|
|
3
3
|
"env": {
|
|
4
4
|
"browser": true,
|
|
5
5
|
"es6": true,
|
|
6
|
-
"node": true
|
|
7
|
-
"mocha": true
|
|
6
|
+
"node": true
|
|
8
7
|
},
|
|
9
8
|
"extends": [
|
|
10
9
|
"standard",
|
|
11
10
|
"standard-react",
|
|
12
|
-
"plugin:react
|
|
11
|
+
"plugin:react/recommended",
|
|
12
|
+
"plugin:react-pug/all",
|
|
13
|
+
"plugin:wdio/recommended"
|
|
13
14
|
],
|
|
14
15
|
"globals": {
|
|
15
16
|
"Atomics": "readonly",
|
|
16
17
|
"SharedArrayBuffer": "readonly"
|
|
17
18
|
},
|
|
18
|
-
"parser": "@babel/eslint-parser",
|
|
19
19
|
"parserOptions": {
|
|
20
20
|
"ecmaFeatures": {
|
|
21
|
-
"legacyDecorators": true
|
|
22
|
-
"jsx": true
|
|
21
|
+
"legacyDecorators": true
|
|
23
22
|
},
|
|
24
|
-
"ecmaVersion":
|
|
25
|
-
"sourceType": "module"
|
|
26
|
-
"babelOptions": {
|
|
27
|
-
"parserOpts": {
|
|
28
|
-
"plugins": ["jsx"]
|
|
29
|
-
}
|
|
30
|
-
}
|
|
23
|
+
"ecmaVersion": "latest",
|
|
24
|
+
"sourceType": "module"
|
|
31
25
|
},
|
|
32
26
|
"plugins": [
|
|
33
27
|
"react",
|
|
34
28
|
"react-pug",
|
|
35
|
-
"eslint-plugin-import-helpers"
|
|
29
|
+
"eslint-plugin-import-helpers",
|
|
30
|
+
"wdio"
|
|
36
31
|
],
|
|
37
32
|
"rules": {
|
|
38
|
-
"prefer-const": "
|
|
33
|
+
"prefer-const": "error",
|
|
39
34
|
"eol-last": "error",
|
|
40
35
|
"react/jsx-handler-names": "off",
|
|
41
36
|
"react/prop-types": "off",
|
|
@@ -55,8 +50,8 @@
|
|
|
55
50
|
"/^@?startupjs.*/",
|
|
56
51
|
"/^@?dmapper.*/",
|
|
57
52
|
"module",
|
|
58
|
-
"
|
|
59
|
-
["
|
|
53
|
+
"/^components/",
|
|
54
|
+
["/^helpers/", "/^hooks/"],
|
|
60
55
|
["sibling", "parent"],
|
|
61
56
|
"/.\/index.styl/"
|
|
62
57
|
]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import init from 'startupjs/init'
|
|
2
|
-
import startupjsServer from 'startupjs/server'
|
|
3
|
-
import orm from '../model'
|
|
4
|
-
import api from './api'
|
|
1
|
+
import init from 'startupjs/init/server.js'
|
|
2
|
+
import startupjsServer from 'startupjs/server.js'
|
|
3
|
+
import orm from '../model/index.js'
|
|
4
|
+
import api from './api/index.js'
|
|
5
5
|
|
|
6
6
|
// Init startupjs ORM.
|
|
7
7
|
init({ orm })
|
|
@@ -3,8 +3,7 @@ import { Platform } from 'react-native'
|
|
|
3
3
|
import init from 'startupjs/init'
|
|
4
4
|
import App from 'startupjs/app'
|
|
5
5
|
import { pug, observer, model } from 'startupjs'
|
|
6
|
-
import {
|
|
7
|
-
import { uiAppPlugin } from '@startupjs/ui'
|
|
6
|
+
import { UiProvider } from '@startupjs/ui'
|
|
8
7
|
import { BASE_URL } from '@env'
|
|
9
8
|
import i18n, { useI18nGlobalInit } from '../i18n'
|
|
10
9
|
import orm from '../model'
|
|
@@ -20,17 +19,12 @@ if (Platform.OS === 'web') window.model = model
|
|
|
20
19
|
// Initialization must start before doing any subscribes to data.
|
|
21
20
|
init({ baseUrl: BASE_URL, orm })
|
|
22
21
|
|
|
23
|
-
registerPlugins({
|
|
24
|
-
'@startupjs/app': [
|
|
25
|
-
[uiAppPlugin, { defaultEnabled: true }]
|
|
26
|
-
]
|
|
27
|
-
})
|
|
28
|
-
|
|
29
22
|
export default observer(() => {
|
|
30
23
|
return pug`
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
UiProvider
|
|
25
|
+
App(
|
|
26
|
+
apps={ i18n, main }
|
|
27
|
+
useGlobalInit=useI18nGlobalInit
|
|
28
|
+
)
|
|
35
29
|
`
|
|
36
30
|
})
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import init from 'startupjs/init'
|
|
2
|
-
import startupjsServer from 'startupjs/server'
|
|
3
|
-
import { initApp } from 'startupjs/app/server'
|
|
4
|
-
import { initI18n } from 'startupjs/i18n/server'
|
|
5
|
-
import { getUiHead, initUi } from '@startupjs/ui/server'
|
|
6
|
-
import orm from '../model'
|
|
7
|
-
import api from './api'
|
|
1
|
+
import init from 'startupjs/init/server.js'
|
|
2
|
+
import startupjsServer from 'startupjs/server.js'
|
|
3
|
+
import { initApp } from 'startupjs/app/server.js'
|
|
4
|
+
import { initI18n } from 'startupjs/i18n/server.js'
|
|
5
|
+
import { getUiHead, initUi } from '@startupjs/ui/server/index.js'
|
|
6
|
+
import orm from '../model/index.js'
|
|
7
|
+
import api from './api/index.js'
|
|
8
8
|
|
|
9
9
|
// Init startupjs ORM.
|
|
10
10
|
init({ orm })
|
package/bundler/babel.config.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('@startupjs/bundler/babel.config')
|
package/bundler/helpers.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('@startupjs/bundler/helpers')
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('@startupjs/bundler/react-native.config')
|
package/bundler/vite.config.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('@startupjs/bundler/vite.config')
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('@startupjs/bundler/webpack.server.config')
|
package/bundler.cjs
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
throw new Error(`
|
|
2
|
-
[startupjs/bundler] ERROR! StartupJS bundler api has changed.
|
|
3
|
-
|
|
4
|
-
Now instead of using general \`require('startupjs/bundler.cjs')\` you have to require
|
|
5
|
-
a specific file you need.
|
|
6
|
-
|
|
7
|
-
Here is what you need to change:
|
|
8
|
-
|
|
9
|
-
1. \`require('startupjs/bundler.cjs').webpackWebConfig\`
|
|
10
|
-
v v v
|
|
11
|
-
\`require('startupjs/bundler/webpack.web.config.cjs')\`
|
|
12
|
-
|
|
13
|
-
2. \`require('startupjs/bundler.cjs').webpackServerConfig\`
|
|
14
|
-
v v v
|
|
15
|
-
\`require('startupjs/bundler/webpack.server.config.cjs')\`
|
|
16
|
-
|
|
17
|
-
3. \`require('startupjs/bundler.cjs').babelConfig\`
|
|
18
|
-
v v v
|
|
19
|
-
\`require('startupjs/bundler/babel.config.cjs')\`
|
|
20
|
-
|
|
21
|
-
4. \`require('startupjs/bundler.cjs').metroConfig\`
|
|
22
|
-
v v v
|
|
23
|
-
\`require('startupjs/bundler/metro.config.cjs')\`
|
|
24
|
-
|
|
25
|
-
5. \`require('startupjs/bundler.cjs').rnConfig\`
|
|
26
|
-
v v v
|
|
27
|
-
\`require('startupjs/bundler/react-native.config.cjs')\`
|
|
28
|
-
|
|
29
|
-
6. \`require('startupjs/bundler.cjs').viteConfig\`
|
|
30
|
-
v v v
|
|
31
|
-
\`require('startupjs/bundler/vite.config.cjs')\`
|
|
32
|
-
|
|
33
|
-
Additionally, if you did override .js/.jsx compilation in your webpack.web.config.cjs, you
|
|
34
|
-
might have used \`getJsxRule\` function there. In which case you should now get it from helpers:
|
|
35
|
-
|
|
36
|
-
7. \`const { getJsxRule } = require('startupjs/bundler.cjs')\`
|
|
37
|
-
v v v
|
|
38
|
-
\`const { getJsxRule } = require('startupjs/bundler/helpers.cjs')\`
|
|
39
|
-
`)
|
|
File without changes
|
|
File without changes
|