sowell-models 1.18.0 → 1.20.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/README.md CHANGED
@@ -17,4 +17,4 @@ Welcome to the **SoWell Models** repository! This project serves as a core libra
17
17
  To use the library in your project, add it as a dependency:
18
18
 
19
19
  ```bash
20
- yarn install @sowell/sowell-models
20
+ yarn install @sowell/sowell-models
package/package.json CHANGED
@@ -1,8 +1,19 @@
1
1
  {
2
2
  "name": "sowell-models",
3
- "version": "1.18.0",
3
+ "version": "1.20.0",
4
4
  "description": "SoWell models",
5
5
  "type": "module",
6
+ "main": "./src/index.ts",
7
+ "module": "./src/index.ts",
8
+ "types": "./src/index.ts",
9
+ "exports": {
10
+ ".": "./src/index.ts",
11
+ "./package.json": "./package.json"
12
+ },
13
+ "files": [
14
+ "src/**/*",
15
+ "build/**/*"
16
+ ],
6
17
  "engines": {
7
18
  "node": ">= 20.9 < 21 || ^22"
8
19
  },
@@ -23,7 +34,15 @@
23
34
  },
24
35
  "scripts": {
25
36
  "clean": "rimraf coverage build tmp",
26
- "prebuild": "npm run lint",
37
+ "build": "npm run clean && tsc --project tsconfig.release.json",
38
+ "build:watch": "tsc --project tsconfig.release.json --watch",
39
+ "dev": "npm run build:watch",
40
+ "link:create": "npm run build && npm link",
41
+ "link:update": "npm run build",
42
+ "link:force": "npm run build && npm unlink && npm link",
43
+ "link:build-only": "npm run build && mv src src.tmp && yarn link && mv src.tmp src",
44
+ "prepublishOnly": "echo 'Publishing TypeScript sources'",
45
+ "release": "yarn build && npm publish --access public",
27
46
  "lint": "eslint .",
28
47
  "prettier": "prettier \"{src,__{tests}__}/**/*.{ts,mts}\" --config .prettierrc --write",
29
48
  "prettier:check": "prettier \"{src,__{tests}__}/**/*.{ts,mts}\" --config .prettierrc --check"
package/src/index.ts CHANGED
@@ -15,6 +15,7 @@ export * from './models/VisitReport';
15
15
  export * from './models/VisitSchedule';
16
16
  export * from './models/Spot';
17
17
  export * from './models/interfaces';
18
+ export * from './models/types';
18
19
  export * from './models/Sector';
19
20
  export * from './models/Assignation';
20
21
  export * from './models/Export';
@@ -11,13 +11,17 @@ export interface ICompany extends IModel {
11
11
  id?: string
12
12
  _id?: string
13
13
  name?: string
14
+ logo_url?: string
14
15
  config?: Record<string, any>
16
+ domain?: string
15
17
  }
16
18
 
17
19
  @Model()
18
20
  export class SPCompany extends ApplicationRecord implements ICompany {
19
21
  static jsonapiType = "companies"
20
22
  @Attr() name!: string
23
+ @Attr() logo_url!: string
24
+ @Attr() domain!: string
21
25
  @Attr() config!: Record<string, any>
22
26
  @HasMany("areas") spAreaItems!: SPAreaItem[]
23
27
  @HasMany("agencies") spAgencyItems!: SPAgencyItem[]
package/.editorconfig DELETED
@@ -1,15 +0,0 @@
1
- root = true
2
-
3
- [*]
4
- charset = utf-8
5
- end_of_line = lf
6
- trim_trailing_whitespace = true
7
- insert_final_newline = true
8
-
9
- [*.md]
10
- insert_final_newline = false
11
- trim_trailing_whitespace = false
12
-
13
- [*.{js,json,ts,mts,yml,yaml}]
14
- indent_size = 2
15
- indent_style = space
@@ -1,24 +0,0 @@
1
- name: npm-publish
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
-
8
- jobs:
9
- npm-publish:
10
- name: npm-publish
11
- runs-on: ubuntu-latest
12
- steps:
13
- - name: Checkout repository
14
- uses: actions/checkout@v4
15
- - name: Nodejs
16
- uses: actions/setup-node@v4
17
- with:
18
- node-version: "16"
19
- cache: yarn
20
- registry-url: https://registry.npmjs.org
21
- - name: publish
22
- run: npm publish --access public
23
- env:
24
- NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
@@ -1,19 +0,0 @@
1
- name: Remove stale branches
2
-
3
- on:
4
- workflow_dispatch:
5
- schedule:
6
- - cron: "0 0 * * *" # Everday at midnight
7
-
8
- jobs:
9
- remove-stale-branches:
10
- name: Remove Stale Branches
11
- runs-on: ubuntu-latest
12
- steps:
13
- - uses: fpicalausa/remove-stale-branches@v1.6.0
14
- with:
15
- dry-run: false # Check out the console output before setting this to false
16
- days-before-branch-stale: 180
17
- days-before-branch-delete: 0
18
- operations-per-run: 50
19
- exempt-authors-regex: "^dependabot"
package/.prettierrc DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "parser": "typescript",
3
- "semi": true,
4
- "singleQuote": true,
5
- "trailingComma": "all"
6
- }
package/eslint.config.mjs DELETED
@@ -1,43 +0,0 @@
1
- // @ts-check
2
- import eslint from '@eslint/js';
3
- import eslintConfigPrettier from 'eslint-config-prettier';
4
- import globals from 'globals';
5
- import tseslint from 'typescript-eslint';
6
-
7
- // This is just an example default config for ESLint.
8
- // You should change it to your needs following the documentation.
9
- export default tseslint.config(
10
- {
11
- ignores: ['**/build/**', '**/tmp/**', '**/coverage/**'],
12
- },
13
- eslint.configs.recommended,
14
- eslintConfigPrettier,
15
- {
16
- extends: [...tseslint.configs.recommended],
17
-
18
- files: ['**/*.ts', '**/*.mts'],
19
-
20
- plugins: {
21
- '@typescript-eslint': tseslint.plugin,
22
- },
23
-
24
- rules: {
25
- '@typescript-eslint/explicit-function-return-type': 'warn',
26
- '@typescript-eslint/no-explicit-any': 'warn'
27
- },
28
-
29
- languageOptions: {
30
- parser: tseslint.parser,
31
- ecmaVersion: 2020,
32
- sourceType: 'module',
33
-
34
- globals: {
35
- ...globals.node,
36
- },
37
-
38
- parserOptions: {
39
- project: './tsconfig.json',
40
- },
41
- },
42
- },
43
- );
package/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from './src';
package/tsconfig.json DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "experimentalDecorators": true,
4
- "allowJs": true,
5
- "target": "es6",
6
- "moduleResolution": "node",
7
- "esModuleInterop": true,
8
- "skipLibCheck": true,
9
- "forceConsistentCasingInFileNames": true,
10
- "resolveJsonModule": true,
11
- "types": ["node"]
12
- }
13
- }
@@ -1,9 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "sourceMap": false,
5
- "removeComments": true
6
- },
7
- "include": ["src"],
8
- "exclude": ["**/*.test.ts", "**/*.spec.ts"]
9
- }