Commit 6c900f2e authored by LAVENIER's avatar LAVENIER
Browse files

Merge branch 'release/0.0.1'

parents cd62c293 d35445dd
Pipeline #12831 waiting for manual action with stage
in 57 seconds
......@@ -17,6 +17,8 @@ insert_final_newline = true
[*.ts]
indent_style = space
indent_size = 2
ij_typescript_use_double_quotes = false
ij_typescript_force_quote_style = true
[*.md]
trim_trailing_whitespace = false
......@@ -6,12 +6,11 @@
"overrides": [
{
"files": [
"**/*.ts"
"*.ts"
],
"parserOptions": {
"project": [
"tsconfig.json",
"e2e/tsconfig.json"
"tsconfig.json"
],
"createDefaultProgram": true
},
......@@ -22,7 +21,9 @@
],
"rules": {
"@angular-eslint/component-class-suffix": "off",
"@typescript-eslint/consistent-type-assertions": "off",
"@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/dot-notation": "off",
"@typescript-eslint/explicit-member-accessibility": [
"off",
......@@ -30,23 +31,29 @@
"accessibility": "explicit"
}
],
"@typescript-eslint/no-shadow": [
"off",
{
"hoist": "all"
}
],
"brace-style": [
"off",
"off"
],
"curly": "off",
"dot-notation": "off",
"id-blacklist": "off",
"id-match": "off",
"no-shadow": [
"off",
{
"hoist": "all"
}
],
"no-empty-function": "off",
"no-shadow": "off",
"no-trailing-spaces": "off",
"no-undef-init": "off",
"no-underscore-dangle": "off",
"no-unused-expressions": "error",
"no-use-before-define": "off",
"radix": "off",
"semi": "error",
"no-console": "off",
"max-len": "off"
}
......
......@@ -12,12 +12,12 @@ log.txt
.vscode/
npm-debug.log*
.idea/
.sourcemaps/
.sass-cache/
.tmp/
.versions/
.local/**
.idea
.sourcemaps
.sass-cache
.tmp
.versions
.local
coverage/
dist/
node_modules/
......@@ -37,3 +37,4 @@ Thumbs.db
UserInterfaceState.xcuserstate
yarn.lock
resources/android/build/local
package-lock.json
default:
image: node:12.19.1
# ---------------------------------------------------------------
# Global
# ---------------------------------------------------------------
# Validate that the repository contains a package.json and extract a few values from it.
before_script:
- |
if [[ ! -f package.json ]]; then
echo "No package.json found! A package.json file is required to publish a package to GitLab's NPM registry."
echo 'For more information, see https://docs.gitlab.com/ee/user/packages/npm_registry/#creating-a-project'
exit 1
fi
- NPM_PACKAGE_NAME=$(node -p "require('./package.json').name")
- NPM_PACKAGE_VERSION=$(node -p "require('./package.json').version")
# default image
image: node:12
stages:
- build
- alt_build
# - test
# - release
- docker
- docs
# ---------------------------------------------------------------
# Global variables
# ---------------------------------------------------------------
variables:
CI_BUILD_IMAGE: $CI_REGISTRY_IMAGE/build:develop
BUILD_ENVIRONMENT: prod
ARTIFACT_ZIP_FILES: ${OUTPUT_DIR}/${CI_PROJECT_NAME}-*.zip
# ---------------------------------------------------------------
# Jobs templates
# ---------------------------------------------------------------
.docker:
image: docker:latest
tags: [simm-runner]
services:
- docker:dind
before_script:
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
after_script:
- docker logout ${CI_REGISTRY}
allow_failure: false
# ---------------------------------------------------------------
# Build jobs
# ---------------------------------------------------------------
# Validate that the package name is properly scoped to the project's root namespace.
# For more information, see https://docs.gitlab.com/ee/user/packages/npm_registry/#package-naming-convention
validate_package_scope:
.build:
stage: build
tags: [simm-runner]
script:
- |
if [[ ! $NPM_PACKAGE_NAME =~ ^@$CI_PROJECT_ROOT_NAMESPACE/ ]]; then
echo "Invalid package scope! Packages must be scoped in the root namespace of the project, e.g. \"@${CI_PROJECT_ROOT_NAMESPACE}/${CI_PROJECT_NAME}\""
echo 'For more information, see https://docs.gitlab.com/ee/user/packages/npm_registry/#package-naming-convention'
exit 1
fi
# If no .npmrc if included in the repo, generate a temporary one to use during the publish step
# that is configured to publish to GitLab's NPM registry
create_npmrc:
stage: build
# Update dependencies
- scripts/ci/dependencies.sh check || yarn install
- yarn run build.${BUILD_ENVIRONMENT}
after_script:
# Remember version
- APP_VERSION=$(node -e "console.log(require('./package.json').version)")
- echo "APP_VERSION=${APP_VERSION}" > variables.env
artifacts:
paths:
- www
reports:
dotenv: variables.env
expire_in: 72 hours
build:
extends: .build
image: ${CI_BUILD_IMAGE}
before_script:
# Get project dependencies
- mv /tmp/.build-cache/node_modules ./
only:
- develop
failsafe-build:
extends: .build
stage: alt_build
when: on_failure
before_script:
# Install global dependencies
- yarn global add @ionic/cli @angular/cli
# Update project dependencies
- yarn install
only:
- develop
docker:ci:
extends: .docker
stage: alt_build
when: on_failure
allow_failure: true
script:
- |
if [[ ! -f .npmrc ]]; then
echo 'No .npmrc found! Creating one now. Please review the following link for more information: https://docs.gitlab.com/ee/user/packages/npm_registry/index.html#authenticating-with-a-ci-job-token'
# Build and push the CI image
- docker build --cache-from ${CI_BUILD_IMAGE} --pull -t ${CI_BUILD_IMAGE} --build-arg="CACHE_DIR=/tmp/build-cache" -f scripts/ci/Dockerfile .
#- docker build --no-cache -t ${CI_BUILD_IMAGE} -f target/ci/DockerFile .
- docker push ${CI_BUILD_IMAGE}
only:
- develop
{
echo '@${CI_PROJECT_ROOT_NAMESPACE}:registry=${CI_SERVER_PROTOCOL}://${CI_SERVER_HOST}:${CI_SERVER_PORT}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/'
echo '//${CI_SERVER_HOST}:${CI_SERVER_PORT}/api/v4/packages/npm/:_authToken=${CI_JOB_TOKEN}'
echo '//${CI_SERVER_HOST}:${CI_SERVER_PORT}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${CI_JOB_TOKEN}'
} >> .npmrc
# ---------------------------------------------------------------
# Release jobs
# ---------------------------------------------------------------
fi
artifacts:
paths:
- .npmrc
# TODO
cache:
paths:
- node_modules/
# ---------------------------------------------------------------
# Docker jobs
# ---------------------------------------------------------------
install_dependencies:
stage: build
.docker-build:
extends: .docker
stage: docker
script:
- npm install
- npm run build.prod
# Build docker image
- docker pull ${CI_REGISTRY_IMAGE}:${IMAGE_TAG} || true
- docker build --cache-from ${CI_REGISTRY_IMAGE}:${IMAGE_TAG} --pull -t ${CI_REGISTRY_IMAGE}:${IMAGE_TAG} --build-arg="HTML=www" --build-arg="NGINX_CONF=scripts/docker/site.conf" -f scripts/docker/Dockerfile .
- docker push ${CI_REGISTRY_IMAGE}:${IMAGE_TAG}
docker:develop:
extends: .docker-build
variables:
IMAGE_TAG: develop
only:
- develop
docker:release:
extends: .docker-build
variables:
IMAGE_TAG: $CI_COMMIT_TAG
only:
- tags
docker:production:
extends: .docker-build
variables:
# IMAGE_TAG: $CI_COMMIT_TAG
IMAGE_TAG: 'production'
only:
- tags
when: manual
# ---------------------------------------------------------------
# Docs jobs
# ---------------------------------------------------------------
pages:
stage: docs
tags: [simm-runner]
image: python:3.7-alpine
before_script:
- apk --update --upgrade add gcc musl-dev jpeg-dev zlib-dev libffi-dev cairo-dev pango-dev gdk-pixbuf-dev
- pip install --upgrade pip
- pip install --upgrade mkdocs
- pip install --upgrade mkdocs-pdf-export-plugin==0.5.5
script:
- mkdocs -v build
- mv site public
artifacts:
paths:
- node_modules/
- public
only:
- develop
when: manual
[submodule "ngx-sumaris-components"]
path = ngx-sumaris-components
url = https://gitlab.ifremer.fr/sih-public/sumaris/ngx-sumaris-components.git
.local
dist
doc
node_modules
resources
scripts
www
src/schema.graphql
{
"trailingComma": "es5",
"semi": true,
"singleQuote": true,
"printWidth": 150,
"tabWidth": 2,
"overrides": [
{
"files": "src/app/**/*.html",
"options": {
"parser": "angular",
"htmlWhitespaceSensitivity": "ignore",
"printWidth": 120
}
}
]
}
......@@ -36,7 +36,8 @@
"apollo-link-logger",
"zen-observable",
"subscriptions-transport-ws",
"chart.js"
"chart.js",
"react"
],
"assets": [
{
......@@ -61,7 +62,7 @@
},
{
"glob": "**/*.*",
"input": "node_modules/material-design-icons/iconfont",
"input": "node_modules/material-design-icons-iconfont/dist/fonts",
"output": "/"
},
{
......@@ -96,20 +97,15 @@
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"aot": true,
"buildOptimizer": true,
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"sourceMap": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"aot": true,
"serviceWorker": false,
"budgets": [
{
"type": "initial",
......@@ -122,24 +118,27 @@
"maximumError": "10kb"
}
],
"serviceWorker": false,
"ngswConfigPath": "ngsw-config.json"
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
},
"dev": {
"development": {
"buildOptimizer": false,
"optimization": false,
"outputHashing": "none",
"sourceMap": true,
"namedChunks": true,
"extractLicenses": false,
"vendorChunk": true,
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"optimization": true,
"buildOptimizer": true,
"aot": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": true,
"extractLicenses": true,
"vendorChunk": false
]
},
"ci": {
"budgets": [
......@@ -150,7 +149,8 @@
],
"progress": false
}
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
......@@ -161,7 +161,11 @@
"production": {
"browserTarget": "app:build:production"
},
"development": {
"browserTarget": "app:build:development"
},
"ci": {
"browserTarget": "app:build:production",
"progress": false
}
}
......@@ -179,7 +183,6 @@
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"scripts": [],
"assets": [
{
"glob": "favicon.ico",
......@@ -200,6 +203,7 @@
"src/theme"
]
},
"scripts": [],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
......@@ -215,7 +219,7 @@
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"builder": "@angular-devkit/build-angular:lint",
"options": {
"lintFilePatterns": [
"src/**/*.ts",
......@@ -223,21 +227,6 @@
]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "app:serve"
},
"configurations": {
"production": {
"devServerTarget": "app:serve:production"
},
"ci": {
"devServerTarget": "app:serve:ci"
}
}
},
"ionic-cordova-build": {
"builder": "@ionic/angular-toolkit:cordova-build",
"options": {
......@@ -265,5 +254,8 @@
}
}
},
"defaultProject": "app"
"defaultProject": "app",
"cli": {
"analytics": false
}
}
......@@ -5,7 +5,7 @@ module.exports = {
/text-mask-core\//,
]
},
'@sumaris/ngx-components': {
'@sumaris-net/ngx-components': {
ignorableDeepImportMatchers: [
/@ionic-native\//,
/ionic-cache\//,
......@@ -15,8 +15,8 @@ module.exports = {
/@apollo\//,
/apollo-angular\//,
/moment\//,
/ngx-material-table\//,
/ngx-material-table\//
]
},
}
}
};
This diff is collapsed.
......@@ -6,18 +6,17 @@
"license": "AGPL-3.0",
"readmeFilename": "README.md",
"scripts": {
"postinstall": "node scripts/node/postinstall.js && ngcc",
"postinstall": "ngcc",
"ng": "ng",
"start": "ng serve",
"serve.aot": "ng serve --aot",
"start.dev": "ng serve --configuration development",
"start.prod": "ng serve --configuration production",
"build": "ng build",
"build.aot": "ng build --aot",
"build.prod": "ng build --prod --aot && npm run build.i18n",
"deploy.prod": "npm run build.prod && scripts/deploy-nexus.sh",
"build.dev": "ng build --configuration=dev && lite-server --baseDir=\"www\"",
"build.i18n": "node scripts/build-i18n.js",
"test": "npm run ng test",
"lint": "npm run ng lint",
"e2e": "npm run ng e2e"
"build.dev": "ng build --configuration development",
"build.prod": "ng build --configuration production && npm run build.i18n",
"build.i18n": "node scripts/node/build-i18n.js",
"test": "ng test",
"lint": "ng lint"
},
"dependencies": {
"@angular/animations": "^11.2.14",
......@@ -30,35 +29,48 @@
"@angular/platform-browser": "^11.2.14",
"@angular/platform-browser-dynamic": "^11.2.14",
"@angular/router": "^11.2.14",
"@apollo/client": "^3.3.19",
"@apollo/client": "^3.4.11",
"@e-is/ngx-material-table": "^0.11.9",
"@ionic/angular": "^5.6.8",
"@ionic/core": "^5.6.8",
"@ionic-native/audio-management": "^5.36.0",
"@ionic-native/camera": "^5.36.0",
"@ionic-native/core": "^5.36.0",
"@ionic-native/downloader": "^5.36.0",
"@ionic-native/geolocation": "^5.36.0",
"@ionic-native/in-app-browser": "^5.36.0",
"@ionic-native/keyboard": "^5.36.0",
"@ionic-native/native-audio": "^5.36.0",
"@ionic-native/network": "^5.36.0",
"@ionic-native/splash-screen": "^5.36.0",
"@ionic-native/status-bar": "^5.36.0",
"@ionic-native/vibration": "^5.36.0",
"@ionic/angular": "^5.6.14",
"@ionic/core": "^5.6.14",
"@ionic/pwa-elements": "^3.0.2",
"@ionic/storage": "^2.3.1",
"@ngtools/webpack": "^11.2.13",
"@ngtools/webpack": "^11.2.14",
"@ngx-translate/core": "^13.0.0",
"@ngx-translate/http-loader": "^6.0.0",
"@sumaris-net/ngx-components": "0.13.16",
"angular-split": "^5.0.0",
"angular2-text-mask": "^9.0.0",
"apollo-angular": "^2.6.0",
"apollo-link-logger": "^2.0.0",
"apollo-link-queue": "^3.1.0",
"apollo-link-serialize": "^3.1.2",
"apollo3-cache-persist": "^0.9.1",
"apollo3-cache-persist": "^0.10.0",
"chart.js": "^2.9.4",
"clovelced-plugin-audiomanagement": "^1.0.2",
"core-js": "^3.11.3",
"core-js": "^3.13.1",
"cors": "^2.8.5",
"ember-cli-roboto-fontface": "^2.0.5",
"geojson": "^0.5.0",
"graphql": "^15.5.0",
"graphql-tag": "^2.12.4",
"graphql": "^15.5.2",
"graphql-tag": "^2.12.5",
"hammer-timejs": "^1.1.0",
"hammerjs": "^2.0.8",
"ionic-cache": "^5.2.0",
"ionicons": "^5.5.1",
"jdenticon": "^3.1.0",
"ionicons": "^5.5.3",
"jdenticon": "^3.1.1",
"localforage": "1.7.4",
"lodash.clonedeep": "^4.5.0",
"luxon": "^1.25.0",
......@@ -73,8 +85,7 @@
"rxjs": "^6.6.7",
"scrypt-async": "^2.0.1",
"seedrandom": "^3.0.5",
"subscriptions-transport-ws": "^0.9.18",
"@sumaris/ngx-components": "file:/mnt/data/git/sumaris/ngx-components/dist",
"subscriptions-transport-ws": "^0.9.19",
"tslib": "^2.2.0",
"tweetnacl": "^1.0.3",
"tweetnacl-util": "^0.15.1",
......@@ -82,47 +93,51 @@
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1102.13",
"@angular-devkit/core": "^11.2.13",
"@angular-devkit/schematics": "^11.2.13",
"@angular-eslint/builder": "4.2.1",
"@angular-eslint/eslint-plugin": "4.2.1",
"@angular-eslint/eslint-plugin-template": "4.2.1",
"@angular-eslint/schematics": "4.2.1",
"@angular-eslint/template-parser": "^4.2.1",
"@angular/cli": "^11.2.13",
"@angular/compiler": "^11.1.2",
"@angular/compiler-cli": "^11.1.2",