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 CHANGED
@@ -1 +1 @@
1
- export * from '@startupjs/app/server'
1
+ export * from '@startupjs/app/server/index.js'
package/backend.js CHANGED
@@ -1 +1,2 @@
1
1
  export { default } from '@startupjs/backend'
2
+ export * from '@startupjs/backend'
@@ -0,0 +1 @@
1
+ export * from '@startupjs/bundler/helpers.js'
package/cli.js CHANGED
@@ -10,4 +10,4 @@ const __dirname = dirname(__filename)
10
10
 
11
11
  const templatesPath = path.join(__dirname, 'templates')
12
12
 
13
- cli.run({ templatesPath: templatesPath })
13
+ cli.run({ templatesPath })
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-alpha.9",
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-alpha.1",
14
- "@startupjs/backend": "^0.55.0-alpha.1",
15
- "@startupjs/bundler": "^0.55.0-alpha.1",
16
- "@startupjs/cli": "^0.55.0-alpha.9",
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-alpha.1",
19
- "@startupjs/i18n": "^0.55.0-alpha.1",
20
- "@startupjs/init": "^0.55.0-alpha.1",
21
- "@startupjs/isomorphic-helpers": "^0.55.0-alpha.1",
22
- "@startupjs/orm": "^0.55.0-alpha.1",
23
- "@startupjs/patches": "^0.55.0-alpha.1",
24
- "@startupjs/react-sharedb": "^0.55.0-alpha.1",
25
- "@startupjs/server": "^0.55.0-alpha.1",
26
- "babel-preset-startupjs": "^0.55.0-alpha.1",
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": "2c8a2d6d1f32741c62c5d4e85edc7c599d07dad7"
29
+ "gitHead": "96bd7446a242b5c096b03a25a99e8a1fae3bb9a7"
30
30
  }
package/server.js CHANGED
@@ -1 +1,2 @@
1
1
  export { default } from '@startupjs/server'
2
+ export * from '@startupjs/server'
@@ -7,14 +7,6 @@ module.exports = {
7
7
  'startupjs/i18n',
8
8
  'startupjs/init',
9
9
  'startupjs/plugin'
10
- ],
11
- server: [
12
- 'startupjs/app',
13
- 'startupjs/i18n',
14
- 'startupjs/init',
15
- 'startupjs/nconf',
16
- 'startupjs/orm',
17
- 'startupjs/server'
18
10
  ]
19
11
  }
20
12
  }
@@ -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-pug/all"
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": 10,
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": "off",
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
- "/components/",
59
- ["/helpers/", "/hooks/"],
53
+ "/^components/",
54
+ ["/^helpers/", "/^hooks/"],
60
55
  ["sibling", "parent"],
61
56
  "/.\/index.styl/"
62
57
  ]
@@ -1,4 +1,4 @@
1
- FROM node:20-alpine
1
+ FROM node:21.2-alpine
2
2
 
3
3
  # !!! REQUIRED !!! env vars:
4
4
  # - MONGO_URL
@@ -1,4 +1,4 @@
1
- import { BaseModel } from 'startupjs/orm'
1
+ import { BaseModel } from 'startupjs/orm.js'
2
2
 
3
3
  export default class TestThingModel extends BaseModel {
4
4
  async addSelf () {
@@ -1,4 +1,4 @@
1
- import TestThing from './TestThingModel'
1
+ import TestThing from './TestThingModel.js'
2
2
 
3
3
  export default function (racer) {
4
4
  racer.orm('testThings.*', TestThing)
@@ -1,5 +1,5 @@
1
1
  import express from 'express'
2
- import testThing from './testThing'
2
+ import testThing from './testThing.js'
3
3
 
4
4
  const router = express.Router()
5
5
 
@@ -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 })
@@ -14,7 +14,6 @@
14
14
  "exclude": [
15
15
  "node_modules",
16
16
  "babel.config.js",
17
- "metro.config.js",
18
- "jest.config.js"
17
+ "metro.config.js"
19
18
  ]
20
19
  }
@@ -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 { registerPlugins } from 'startupjs/plugin'
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
- App(
32
- apps={ i18n, main }
33
- useGlobalInit=useI18nGlobalInit
34
- )
24
+ UiProvider
25
+ App(
26
+ apps={ i18n, main }
27
+ useGlobalInit=useI18nGlobalInit
28
+ )
35
29
  `
36
30
  })
@@ -1,4 +1,4 @@
1
- import { BaseModel } from 'startupjs/orm'
1
+ import { BaseModel } from 'startupjs/orm.js'
2
2
 
3
3
  export default class TestThingModel extends BaseModel {
4
4
  async addSelf () {
@@ -1,6 +1,6 @@
1
- import initI18nModel from 'startupjs/i18n/model'
1
+ import initI18nModel from 'startupjs/i18n/model.js'
2
2
 
3
- import TestThing from './TestThingModel'
3
+ import TestThing from './TestThingModel.js'
4
4
 
5
5
  export default function (racer) {
6
6
  initI18nModel(racer)
@@ -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 })
@@ -1 +0,0 @@
1
- module.exports = require('@startupjs/bundler/babel.config')
@@ -1 +0,0 @@
1
- module.exports = require('@startupjs/bundler/helpers')
@@ -1 +0,0 @@
1
- module.exports = require('@startupjs/bundler/react-native.config')
@@ -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
- `)
@@ -1,6 +0,0 @@
1
- const getConfig = require('startupjs/bundler/react-native.config.cjs')
2
-
3
- module.exports = getConfig({
4
- project: {},
5
- assets: []
6
- })
@@ -1,9 +0,0 @@
1
- import startupjsPlugin from '@startupjs/vite-plugin-startupjs'
2
- import { defineConfig } from 'vite'
3
-
4
- // https://vitejs.dev/config/
5
- export default defineConfig({
6
- plugins: [
7
- startupjsPlugin()
8
- ]
9
- })
@@ -1,6 +0,0 @@
1
- const getConfig = require('startupjs/bundler/webpack.server.config.cjs')
2
-
3
- module.exports = getConfig(undefined, {
4
- forceCompileModules: [],
5
- alias: {}
6
- })
@@ -1,3 +0,0 @@
1
- module.exports = {
2
- // StartupJS configuration and plugins
3
- }
File without changes