@live-change/user-service 0.3.41 → 0.4.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/authenticator.js CHANGED
@@ -1,8 +1,8 @@
1
- const App = require('@live-change/framework')
1
+ import App from '@live-change/framework'
2
2
  const app = App.app()
3
- const definition = require('./definition.js')
3
+ import definition from './definition.js'
4
4
 
5
- const { User, AuthenticatedUser } = require('./model.js')
5
+ import { User, AuthenticatedUser } from './model.js'
6
6
 
7
7
  definition.authenticator({
8
8
  async credentialsObservable(credentials) {
package/combinations.js CHANGED
@@ -14,4 +14,4 @@ function allCombinations(x) {
14
14
  return acc
15
15
  }
16
16
 
17
- module.exports = { combinations, allCombinations }
17
+ export { combinations, allCombinations }
@@ -1,9 +1,10 @@
1
- const definition = require("./definition.js")
2
- const App = require("@live-change/framework")
3
- const { PropertyDefinition, ViewDefinition, IndexDefinition, ActionDefinition, EventDefinition } = App
4
- const { User } = require("./model.js")
1
+ import definition from './definition.js'
2
+ import {
3
+ PropertyDefinition, ViewDefinition, IndexDefinition, ActionDefinition, EventDefinition
4
+ } from '@live-change/framework'
5
+ import { User } from "./model.js"
5
6
 
6
- const pluralize = require('pluralize')
7
+ import pluralize from 'pluralize'
7
8
 
8
9
  definition.processor(function(service, app) {
9
10
 
@@ -1,11 +1,13 @@
1
- const definition = require("./definition.js")
2
- const App = require("@live-change/framework")
3
- const { PropertyDefinition, ViewDefinition, IndexDefinition, ActionDefinition, EventDefinition } = App
4
- const { User } = require("./model.js")
5
- const { allCombinations } = require("./combinations.js")
6
- const { createIdentifiersProperties } = require('./utils.js')
1
+ import definition from './definition.js'
2
+ import App from '@live-change/framework'
3
+ import {
4
+ PropertyDefinition, ViewDefinition, IndexDefinition, ActionDefinition, EventDefinition
5
+ } from '@live-change/framework'
6
+ import { User } from "./model.js"
7
+ import { allCombinations } from "./combinations.js"
8
+ import { createIdentifiersProperties } from './utils.js'
7
9
 
8
- const pluralize = require('pluralize')
10
+ import pluralize from 'pluralize'
9
11
 
10
12
  definition.processor(function(service, app) {
11
13
 
package/definition.js CHANGED
@@ -1,10 +1,11 @@
1
- const app = require("@live-change/framework").app()
1
+ import App from '@live-change/framework'
2
+ const app = App.app()
2
3
 
3
- const relationsPlugin = require('@live-change/relations-plugin')
4
+ import relationsPlugin from '@live-change/relations-plugin'
4
5
 
5
6
  const definition = app.createServiceDefinition({
6
7
  name: "user",
7
8
  use: [ relationsPlugin ]
8
9
  })
9
10
 
10
- module.exports = definition
11
+ export default definition
package/index.js CHANGED
@@ -1,14 +1,15 @@
1
- const app = require("@live-change/framework").app()
2
- const definition = require('./definition.js')
1
+ import App from '@live-change/framework'
2
+ const app = App.app()
3
+ import definition from './definition.js'
3
4
 
4
- const { User, AutheticatedUser } = require('./model.js')
5
- require('./authenticator.js')
6
- require('./userProperty.js')
7
- require('./userItem.js')
8
- require('./sessionOrUserProperty.js')
9
- require('./sessionOrUserItem.js')
10
- require('./contactOrUserProperty.js')
11
- require('./contactOrUserItem.js')
5
+ import { User } from './model.js'
6
+ import './authenticator.js'
7
+ import './userProperty.js'
8
+ import './userItem.js'
9
+ import './sessionOrUserProperty.js'
10
+ import './sessionOrUserItem.js'
11
+ import './contactOrUserProperty.js'
12
+ import './contactOrUserItem.js'
12
13
 
13
14
  const Session = definition.foreignModel('session', 'Session')
14
15
 
@@ -133,4 +134,4 @@ definition.action({
133
134
  }
134
135
  })
135
136
 
136
- module.exports = definition
137
+ export default definition
package/model.js CHANGED
@@ -1,4 +1,4 @@
1
- const definition = require('./definition.js')
1
+ import definition from './definition.js'
2
2
 
3
3
  const User = definition.model({
4
4
  name: "User",
@@ -85,4 +85,4 @@ definition.event({
85
85
  }
86
86
  })
87
87
 
88
- module.exports = { User, Session, AuthenticatedUser }
88
+ export { User, Session, AuthenticatedUser }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/user-service",
3
- "version": "0.3.41",
3
+ "version": "0.4.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -20,10 +20,11 @@
20
20
  "name": "Michał Łaszczewski",
21
21
  "url": "https://www.viamage.com/"
22
22
  },
23
+ "type": "module",
23
24
  "dependencies": {
24
- "@live-change/framework": "0.7.39",
25
- "@live-change/relations-plugin": "0.7.39",
25
+ "@live-change/framework": "0.8.0",
26
+ "@live-change/relations-plugin": "0.8.0",
26
27
  "pluralize": "^8.0.0"
27
28
  },
28
- "gitHead": "cf7a4196465c134c4685571526754330d7c70475"
29
+ "gitHead": "87010b19907140a326943f22cd538eafdc9c28f1"
29
30
  }
@@ -1,9 +1,11 @@
1
- const definition = require("./definition.js")
2
- const App = require("@live-change/framework")
3
- const { PropertyDefinition, ViewDefinition, IndexDefinition, ActionDefinition, EventDefinition, TriggerDefinition } = App
4
- const { User, Session } = require("./model.js")
1
+ import definition from './definition.js'
2
+ import App from '@live-change/framework'
3
+ import {
4
+ PropertyDefinition, ViewDefinition, IndexDefinition, ActionDefinition, EventDefinition, TriggerDefinition
5
+ } from '@live-change/framework'
6
+ import { User, Session } from "./model.js"
5
7
 
6
- const pluralize = require('pluralize')
8
+ import pluralize from 'pluralize'
7
9
 
8
10
  definition.processor(function(service, app) {
9
11
 
@@ -1,12 +1,13 @@
1
- const definition = require("./definition.js")
2
- const App = require("@live-change/framework")
3
- const { PropertyDefinition, ViewDefinition, IndexDefinition, ActionDefinition, EventDefinition } = App
4
- const { User, Session } = require("./model.js")
5
- const { allCombinations } = require("./combinations.js")
6
- const { createIdentifiersProperties } = require('./utils.js')
7
-
8
- const pluralize = require('pluralize')
1
+ import definition from './definition.js'
2
+ import App from '@live-change/framework'
3
+ import {
4
+ PropertyDefinition, ViewDefinition, IndexDefinition, ActionDefinition, EventDefinition
5
+ } from '@live-change/framework'
6
+ import { User, Session } from "./model.js"
7
+ import { allCombinations } from "./combinations.js"
8
+ import { createIdentifiersProperties } from './utils.js'
9
9
 
10
+ import pluralize from 'pluralize'
10
11
 
11
12
  definition.processor(function(service, app) {
12
13
 
package/userItem.js CHANGED
@@ -1,9 +1,10 @@
1
- const definition = require("./definition.js")
2
- const App = require("@live-change/framework")
3
- const { PropertyDefinition, ViewDefinition, IndexDefinition, ActionDefinition, EventDefinition } = App
4
- const { User } = require("./model.js")
5
-
6
- const pluralize = require('pluralize')
1
+ import definition from './definition.js'
2
+ import App from '@live-change/framework'
3
+ import {
4
+ PropertyDefinition, ViewDefinition, IndexDefinition, ActionDefinition, EventDefinition
5
+ } from '@live-change/framework'
6
+ import { User } from "./model.js"
7
+ import pluralize from 'pluralize'
7
8
 
8
9
  definition.processor(function(service, app) {
9
10
 
package/userProperty.js CHANGED
@@ -1,7 +1,9 @@
1
- const definition = require("./definition.js")
2
- const App = require("@live-change/framework")
3
- const { PropertyDefinition, ViewDefinition, IndexDefinition, ActionDefinition, EventDefinition } = App
4
- const { User } = require("./model.js")
1
+ import definition from './definition.js'
2
+ import App from "@live-change/framework"
3
+ import {
4
+ PropertyDefinition, ViewDefinition, IndexDefinition, ActionDefinition, EventDefinition
5
+ } from '@live-change/framework'
6
+ import { User } from "./model.js"
5
7
 
6
8
  definition.processor(function(service, app) {
7
9
 
package/utils.js CHANGED
@@ -13,4 +13,4 @@ function createIdentifiersProperties(keys) {
13
13
  return identifiers
14
14
  }
15
15
 
16
- module.exports = { createIdentifiersProperties }
16
+ export { createIdentifiersProperties }