Skip to content

Commit

Permalink
Merge pull request #24 from fleetbase/dev-v0.1.6
Browse files Browse the repository at this point in the history
v0.1.6
  • Loading branch information
roncodes authored Dec 25, 2023
2 parents 5ad2d8c + 2486e60 commit a819737
Show file tree
Hide file tree
Showing 37 changed files with 2,557 additions and 3,811 deletions.
12 changes: 2 additions & 10 deletions .ember-cli
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
{
/**
Ember CLI sends analytics information by default. The data is completely
anonymous, but there are times when you might want to disable this behavior.

Setting `disableAnalytics` to true will prevent any data from being sent.
*/
"disableAnalytics": false,

/**
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
*/
"isTypeScriptProject": false
}
12 changes: 0 additions & 12 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*
.*/
.eslintcache

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
18 changes: 7 additions & 11 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

module.exports = {
root: true,
parser: 'babel-eslint',
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 2018,
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true,
requireConfigFile: false,
babelOptions: {
plugins: [['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }]],
},
},
plugins: ['ember'],
Expand All @@ -27,6 +28,7 @@ module.exports = {
files: [
'./.eslintrc.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./index.js',
Expand All @@ -42,13 +44,7 @@ module.exports = {
browser: false,
node: true,
},
plugins: ['node'],
extends: ['plugin:node/recommended'],
},
{
// test files
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
extends: ['plugin:n/recommended'],
},
],
};
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
node-version: [16.x] # Build on Node.js 16
node-version: [18.x] # Build on Node.js 18

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -42,10 +42,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Setup Node.js 16.x
- name: Setup Node.js 18.x
uses: actions/setup-node@v2
with:
node-version: 16.x
node-version: 18.x

- name: Setup pnpm
uses: pnpm/[email protected]
Expand All @@ -71,10 +71,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Setup Node.js 16.x
- name: Setup Node.js 18.x
uses: actions/setup-node@v2
with:
node-version: 16.x
node-version: 18.x

- name: Setup pnpm
uses: pnpm/[email protected]
Expand Down
9 changes: 1 addition & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist/
/tmp/
/declarations/

# dependencies
/bower_components/
/node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/.eslintcache
/connect.lock
/coverage/
/libpeerconnection.log
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
Expand Down
9 changes: 2 additions & 7 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
/dist/
/tmp/

# dependencies
/bower_components/

# misc
/.bowerrc
/.editorconfig
/.ember-cli
/.env*
Expand All @@ -18,11 +14,11 @@
/.gitignore
/.prettierignore
/.prettierrc.js
/.stylelintignore
/.stylelintrc.js
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
/bower.json
/config/ember-try.js
/CONTRIBUTING.md
/ember-cli-build.js
/testem.js
Expand All @@ -33,7 +29,6 @@

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
Expand Down
14 changes: 1 addition & 13 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*
.eslintcache
.lint-todo/
.*/

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
2 changes: 1 addition & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
printWidth: 190,
overrides: [
{
files: '*.hbs',
files: '*.{hbs,js,ts}',
options: {
singleQuote: false,
},
Expand Down
8 changes: 8 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# unconventional files
/blueprints/*/files/

# compiled output
/dist/

# addons
/.node_modules.ember-try/
5 changes: 5 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
extends: ['stylelint-config-standard', 'stylelint-prettier/recommended'],
};
2 changes: 1 addition & 1 deletion .watchmanconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ignore_dirs": ["tmp", "dist"]
"ignore_dirs": ["dist"]
}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

## Compatibility

* Ember.js v3.24 or above
* Ember CLI v3.24 or above
* Node.js v14 or above
* Ember.js v4.8 or above
* Ember CLI v4.8 or above
* Node.js v18 or above


## Installation
Expand Down
2 changes: 0 additions & 2 deletions addon/models/entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,9 @@ export default class EntityModel extends Model {
})
dimensions_unit;
@attr('string') declared_value;
@attr('string') tracking;
@attr('string') sku;
@attr('string') price;
@attr('string') sale_price;
@attr('string') _import_id;
@attr('string') slug;
@attr('raw') meta;

Expand Down
2 changes: 0 additions & 2 deletions addon/models/order.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ export default class OrderModel extends Model {

/** @attributes */
@attr('string') tracking;
@attr('string') meta;
@attr('string') tracking;
@attr('string') qr_code;
@attr('string') pickup_name;
@attr('string') dropoff_name;
Expand Down
7 changes: 7 additions & 0 deletions addon/models/tracking-status.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,11 @@ export default class TrackingStatusModel extends Model {
}
return formatDate(this.created_at, 'PP');
}

@computed('created_at') get createdAtShortWithTime() {
if (!isValidDate(this.created_at)) {
return null;
}
return formatDate(this.created_at, 'PP p');
}
}
1 change: 0 additions & 1 deletion addon/models/vehicle-device.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export default class VehicleDeviceModel extends Model {
@attr('string') device_name;
@attr('string') device_location;
@attr('string') device_model;
@attr('string') device_location;
@attr('string') manufacturer;
@attr('string') serial_number;
@attr('string') data_frequency;
Expand Down
3 changes: 1 addition & 2 deletions addon/utils/geojson/circle.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import GeoJson, { EarthRadius, MercatorCRS, DegreesPerRadian, RadiansPerDegree } from './geo-json';
import Feature from './feature';
import closedPolygon from './closed-polygon';
import { assign } from '@ember/polyfills';

function radToDeg(rad) {
return rad * DegreesPerRadian;
Expand Down Expand Up @@ -78,7 +77,7 @@ export default class Circle extends GeoJson {
throw new Error('GeoJSON: missing parameter for new Circle');
}

assign(
Object.assign(
this,
new Feature({
type: 'Feature',
Expand Down
3 changes: 1 addition & 2 deletions addon/utils/geojson/feature-collection.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import GeoJson from './geo-json';
import Feature from './feature';
import { assign } from '@ember/polyfills';
import { isArray } from '@ember/array';

export default class FeatureCollection extends GeoJson {
constructor(input) {
super();

if (input && input.type === 'FeatureCollection' && input.features) {
assign(this, input);
Object.assign(this, input);
} else if (isArray(input)) {
this.features = input;
} else {
Expand Down
3 changes: 1 addition & 2 deletions addon/utils/geojson/feature.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import GeoJson from './geo-json';
import { assign } from '@ember/polyfills';

export default class Feature extends GeoJson {
constructor(input) {
super();

if (input && input.type === 'Feature') {
assign(this, input);
Object.assign(this, input);
} else if (input && input.type && input.coordinates) {
this.geometry = input;
} else {
Expand Down
3 changes: 1 addition & 2 deletions addon/utils/geojson/geometry-collection.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import GeoJson from './geo-json';
import { assign } from '@ember/polyfills';
import { isArray } from '@ember/array';

export default class GeometryCollection extends GeoJson {
constructor(input) {
super();

if (input && input.type === 'GeometryCollection' && input.geometries) {
assign(this, input);
Object.assign(this, input);
} else if (isArray(input)) {
this.geometries = input;
} else if (input.coordinates && input.type) {
Expand Down
3 changes: 1 addition & 2 deletions addon/utils/geojson/line-string.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import GeoJson from './geo-json';
import { assign } from '@ember/polyfills';
import { isArray } from '@ember/array';

export default class LineString extends GeoJson {
constructor(input) {
super();

if (input && input.type === 'LineString' && input.coordinates) {
assign(this, input);
Object.assign(this, input);
} else if (isArray(input)) {
this.coordinates = input;
} else {
Expand Down
3 changes: 1 addition & 2 deletions addon/utils/geojson/multi-line-string.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import GeoJson from './geo-json';
import LineString from './line-string';
import { assign } from '@ember/polyfills';
import { isArray } from '@ember/array';

export default class MultiLineString extends GeoJson {
constructor(input) {
super();

if (input && input.type === 'MultiLineString' && input.coordinates) {
assign(this, input);
Object.assign(this, input);
} else if (isArray(input)) {
this.coordinates = input;
} else {
Expand Down
Loading

0 comments on commit a819737

Please sign in to comment.