diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000000000..30e849c62
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,6 @@
+# EditorConfig is awesome: https://EditorConfig.org
+
+[*]
+# Ensure consistent file encoding in UNIX style
+charset = utf-8
+end_of_line = lf
diff --git a/.github/workflows/check-docs.yaml b/.github/workflows/check-docs.yaml
new file mode 100644
index 000000000..f73fc31f9
--- /dev/null
+++ b/.github/workflows/check-docs.yaml
@@ -0,0 +1,24 @@
+name: Check Docs
+
+on:
+ push:
+ branches:
+ - develop
+ pull_request:
+ branches:
+ - develop
+
+jobs:
+ prettier:
+ name: Lint prettier
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+
+ - uses: actions/setup-node@v4
+ with:
+ node-version: lts/gallium
+
+ - name: Run Prettier on Docs
+ working-directory: docs
+ run: npx prettier . --check
diff --git a/.github/workflows/check-generic.yaml b/.github/workflows/check-generic.yaml
new file mode 100644
index 000000000..1b2c8d065
--- /dev/null
+++ b/.github/workflows/check-generic.yaml
@@ -0,0 +1,40 @@
+# Generic checks to ease collaboration:
+# - consistent file encoding in UNIX style
+# - whitespaces in all purposes files like markdown, yaml, etc
+name: Check Generic
+
+on:
+ push:
+ branches:
+ - develop
+ pull_request:
+ branches:
+ - develop
+
+jobs:
+ editorconfig-checker:
+ name: Run editorconfig-checker
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - name: Run editorconfig-checker
+ run: docker run --rm --volume=$PWD:/check mstruebing/editorconfig-checker
+
+ markdownlint:
+ name: Run markdownlint
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - name: Run markdownlint-cli2
+ uses: DavidAnson/markdownlint-cli2-action@v13
+
+ yamllint:
+ name: Run yamllint
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - name: Run yamllint
+ run: yamllint .
diff --git a/.markdownlint-cli2.yaml b/.markdownlint-cli2.yaml
new file mode 100644
index 000000000..bf17a7f7c
--- /dev/null
+++ b/.markdownlint-cli2.yaml
@@ -0,0 +1,14 @@
+# Disable some built-in rules
+config:
+ line-length: false
+ no-inline-html: false
+ first-line-h1: false
+ code-fence-style:
+ style: backtick
+
+# Define glob expressions to use (only valid at root)
+globs:
+ - "**/*.md"
+
+# Ignore files that are not part of version control
+gitignore: true
diff --git a/.prettierrc b/.prettierrc
index cdd38ad80..48cd1cf85 100755
--- a/.prettierrc
+++ b/.prettierrc
@@ -1,16 +1,12 @@
{
- "printWidth": 100,
- "singleQuote": true,
- "useTabs": false,
- "semi": true,
- "tabWidth": 4,
- "trailingComma": "none",
- "overrides": [
- {
- "files": "*.{yaml,yml}",
- "options": {
- "tabWidth": 2
- }
- }
- ]
+ "singleQuote": true,
+ "trailingComma": "all",
+ "overrides": [
+ {
+ "files": "*.{yaml,yml}",
+ "options": {
+ "singleQuote": false
+ }
+ }
+ ]
}
diff --git a/.yamllint b/.yamllint
new file mode 100644
index 000000000..a0a00a215
--- /dev/null
+++ b/.yamllint
@@ -0,0 +1,18 @@
+extends: default
+
+ignore-from-file:
+ - .gitignore
+ - .yamllintignore
+
+rules:
+ document-start: disable
+ indentation:
+ spaces: 2
+ line-length: disable
+ quoted-strings:
+ quote-type: double
+ required: only-when-needed
+ allow-quoted-quotes: true
+ check-keys: true
+ truthy:
+ check-keys: false
diff --git a/.yamllintignore b/.yamllintignore
new file mode 100644
index 000000000..bd5535a60
--- /dev/null
+++ b/.yamllintignore
@@ -0,0 +1 @@
+pnpm-lock.yaml
diff --git a/README.md b/README.md
index 8b7b3d911..d6a5543e4 100644
--- a/README.md
+++ b/README.md
@@ -28,62 +28,72 @@
---
+
Repository for Origin DREC project
## Local environment setup of Ubuntu
Install `wsl`,`ubuntu-18.04` in command prompt running as administrator:
-```
+
+```sh
wsl --install
wsl --install --distribution Ubuntu-18.04
```
-Install `Influx-Client`:
-```
+Install `Influx-Client`:
+
+```sh
sudo apt install influx client
sudo apt update
```
Restart the Ubuntu terminal once, after installation done.
Clone and Install `nvm`:
-```
+
+```sh
sudo wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
nvm install 14.19.1
```
Install `rush`, `pnpm` if you don't have it:
-```
+
+```sh
npm i -g @microsoft/rush
npm i -g pnpm
```
Create and change directory:
-```
+
+```sh
mkdir drec
cd drec
```
Clone repository:
It should be cloned in both local and Ubuntu environment.
-```
+
+```sh
git clone https://github.com/drec/drec-origin.git
chmod -R 777 drec-origin/
```
Copy `.env.example` to `.env` and adjust `.env` with your environment specific parameters.
-```
+
+```sh
cp .env.example .env
```
Start Postgres, Redis, InfluxDB instance
Please create and start your Postgres, Redis and InfluxDB by running below command in our root directory, after that anytime you can manage this images through your docker desktop installed on your system.
-```
+
+```sh
docker-compose up --build
```
Create Postgres DB table
-```
+
+```sh
psql -h localhost -p 5432 -U postgres -c "CREATE DATABASE origin"
```
@@ -91,25 +101,27 @@ Create Default Admin:
Please update below environment variables under defauld admin credential with the values that you wanted to create as default admin user.
-```
+```sh
ADMIN_EMAIL
ADMIN_PASSWORD
```
-
Install dependencies, Run db migrations:
-```
+
+```sh
rush install
rush build
```
Run API project
-```
+
+```sh
rush start:dev
```
You may also want to drop local databases with
-```
+
+```sh
rush drop
```
@@ -117,29 +129,29 @@ rush drop
Go inside integrators-scripts folder
Create a .env, copy everything from .env.example and change the necessary variables depending on the environment
-```
+
+```sh
npm i
npm run start
```
-## Metamask Setup:
+## Metamask Setup
-1. The metamask extension required to add in default browser before generating certificate. Create login
-2. When selecting netweok option choose the add manual network, use below values to create network manually
- a. Network Name - It's depend on user (ex., Volta, Voltatest)
- b. New RPC URL - https://volta-rpc.energyweb.org
- c. ChainID - 73799
- d. Symbol - VT
- e. Block Explorer URL - https://volta-rpc.energyweb.org
+1. The metamask extension required to add in default browser before generating certificate. Create login
+2. When selecting netweok option choose the add manual network, use below values to create network manually
+ a. Network Name - It's depend on user (ex., Volta, Voltatest)
+ b. New RPC URL -
+ c. ChainID - 73799
+ d. Symbol - VT
+ e. Block Explorer URL -
3. Update your blockchain address and mnemonic as the variables `DREC_BLOCKCHAIN_ADDRESS` and `MNEMONIC` in our .env file
-4. Add balance to your wallet using this link https://voltafaucet.energyweb.org/ by providing your blockchain address of your metamask
+4. Add balance to your wallet using this link by providing your blockchain address of your metamask
5. To get the issuer private key, go to Account details, click on the show private key button, there you will find the your Issuer private key. Add this key in your environment file as `ISSUER_PRIVATE_KEY`
-
Before running the script, make sure:
1. You have updated the DREC_BACKEND_URL in .env with local - also update the username and password for each integrator
2. Post generated devices to Server - Bulk Devices
3. You updated DREC_USERNAME & DREC_PASSWORD with the Owner credentials based on the integrator (Okra, BBOX, Engie etc.)
4. The methods in index.js should run independently. After each step, comment the completed step, uncomment the next step and restart the server
-5. You can also use the docker desktop installed in local system which will be used to up the docker containers manually
\ No newline at end of file
+5. You can also use the docker desktop installed in local system which will be used to up the docker containers manually
diff --git a/apps/drec-api/.lintstagedrc b/apps/drec-api/.lintstagedrc
index 99dbc7b8a..08e645cf2 100755
--- a/apps/drec-api/.lintstagedrc
+++ b/apps/drec-api/.lintstagedrc
@@ -3,4 +3,4 @@
"prettier --write --config-precedence file-override './src/**/*'",
"eslint --fix"
]
-}
\ No newline at end of file
+}
diff --git a/apps/drec-api/.prettierrc b/apps/drec-api/.prettierrc
deleted file mode 100755
index dcb72794f..000000000
--- a/apps/drec-api/.prettierrc
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "singleQuote": true,
- "trailingComma": "all"
-}
\ No newline at end of file
diff --git a/apps/drec-api/buildspec.yml b/apps/drec-api/buildspec.yml
index 06696cba4..5ad3371db 100755
--- a/apps/drec-api/buildspec.yml
+++ b/apps/drec-api/buildspec.yml
@@ -1,22 +1,22 @@
-version: 0.2
-env:
- parameter-store:
- docker_username: /powertrust/docker/username
- docker_password: /powertrust/docker/password
-phases:
- install:
- # runtime-versions:
- # nodejs: 18
- # docker: 18
- commands:
- - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://127.0.0.1:2375 --storage-driver=overlay2 &
- - timeout 15 sh -c "until docker info; do echo .; sleep 1; done"
- - curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
- - chmod +x ./kubectl
- - curl -Lo aws-iam-authenticator https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v0.5.9/aws-iam-authenticator_0.5.9_linux_amd64
- - chmod +x ./aws-iam-authenticator
- - export PATH=$PWD/:$PATH
- build:
- commands:
- - chmod +x ./buildscript.sh
- - ./buildscript.sh
+version: 0.2
+env:
+ parameter-store:
+ docker_username: /powertrust/docker/username
+ docker_password: /powertrust/docker/password
+phases:
+ install:
+ # runtime-versions:
+ # nodejs: 18
+ # docker: 18
+ commands:
+ - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://127.0.0.1:2375 --storage-driver=overlay2 &
+ - timeout 15 sh -c "until docker info; do echo .; sleep 1; done"
+ - curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
+ - chmod +x ./kubectl
+ - curl -Lo aws-iam-authenticator https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v0.5.9/aws-iam-authenticator_0.5.9_linux_amd64
+ - chmod +x ./aws-iam-authenticator
+ - export PATH=$PWD/:$PATH
+ build:
+ commands:
+ - chmod +x ./buildscript.sh
+ - ./buildscript.sh
diff --git a/apps/drec-api/drec-api-dev.yaml b/apps/drec-api/drec-api-dev.yaml
index a9d8748bc..5e8b0caf8 100755
--- a/apps/drec-api/drec-api-dev.yaml
+++ b/apps/drec-api/drec-api-dev.yaml
@@ -14,14 +14,14 @@ spec:
app.kubernetes.io/name: drec-api
spec:
containers:
- - image: 895706603967.dkr.ecr.eu-west-1.amazonaws.com/drec-api:{{BUILD_NUMBER}}
- imagePullPolicy: Always
- name: drec-api
- envFrom:
- - secretRef:
- name: drec-dev-env
- ports:
- - containerPort: 3040
+ - image: 895706603967.dkr.ecr.eu-west-1.amazonaws.com/drec-api:{{BUILD_NUMBER}}
+ imagePullPolicy: Always
+ name: drec-api
+ envFrom:
+ - secretRef:
+ name: drec-dev-env
+ ports:
+ - containerPort: 3040
---
apiVersion: v1
kind: Service
diff --git a/apps/drec-api/drec-api-migrate-dev.yaml b/apps/drec-api/drec-api-migrate-dev.yaml
index e8442416b..93f1d04ed 100755
--- a/apps/drec-api/drec-api-migrate-dev.yaml
+++ b/apps/drec-api/drec-api-migrate-dev.yaml
@@ -14,14 +14,14 @@ spec:
app.kubernetes.io/name: drec-api-migrate
spec:
containers:
- - image: 895706603967.dkr.ecr.eu-west-1.amazonaws.com/drec-api-migrate:{{BUILD_NUMBER}}
- imagePullPolicy: Always
- name: drec-api-migrate
- envFrom:
- - secretRef:
- name: drec-dev-env
- ports:
- - containerPort: 3040
+ - image: 895706603967.dkr.ecr.eu-west-1.amazonaws.com/drec-api-migrate:{{BUILD_NUMBER}}
+ imagePullPolicy: Always
+ name: drec-api-migrate
+ envFrom:
+ - secretRef:
+ name: drec-dev-env
+ ports:
+ - containerPort: 3040
---
apiVersion: v1
kind: Service
diff --git a/apps/drec-api/drec-api-prod.yaml b/apps/drec-api/drec-api-prod.yaml
index dc375ffd0..3764907b4 100755
--- a/apps/drec-api/drec-api-prod.yaml
+++ b/apps/drec-api/drec-api-prod.yaml
@@ -14,19 +14,19 @@ spec:
app.kubernetes.io/name: drec-api
spec:
containers:
- - image: 895706603967.dkr.ecr.eu-west-1.amazonaws.com/drec-api:{{BUILD_NUMBER}}
- imagePullPolicy: Always
- name: drec-api
- envFrom:
- - secretRef:
- name: drec-prod-env
- ports:
- - containerPort: 3040
- resources:
- limits:
- cpu: 100m
- requests:
- cpu: 50m
+ - image: 895706603967.dkr.ecr.eu-west-1.amazonaws.com/drec-api:{{BUILD_NUMBER}}
+ imagePullPolicy: Always
+ name: drec-api
+ envFrom:
+ - secretRef:
+ name: drec-prod-env
+ ports:
+ - containerPort: 3040
+ resources:
+ limits:
+ cpu: 100m
+ requests:
+ cpu: 50m
---
apiVersion: v1
kind: Service
diff --git a/apps/drec-api/drec-api-stage.yaml b/apps/drec-api/drec-api-stage.yaml
index 6d98f8e91..534e943f3 100755
--- a/apps/drec-api/drec-api-stage.yaml
+++ b/apps/drec-api/drec-api-stage.yaml
@@ -14,14 +14,14 @@ spec:
app.kubernetes.io/name: drec-api
spec:
containers:
- - image: 895706603967.dkr.ecr.eu-west-1.amazonaws.com/drec-api:{{BUILD_NUMBER}}
- imagePullPolicy: Always
- name: drec-api
- envFrom:
- - secretRef:
- name: drec-stage-env
- ports:
- - containerPort: 3040
+ - image: 895706603967.dkr.ecr.eu-west-1.amazonaws.com/drec-api:{{BUILD_NUMBER}}
+ imagePullPolicy: Always
+ name: drec-api
+ envFrom:
+ - secretRef:
+ name: drec-stage-env
+ ports:
+ - containerPort: 3040
---
apiVersion: v1
kind: Service
diff --git a/apps/drec-api/ormconfig-certificate.ts b/apps/drec-api/ormconfig-certificate.ts
index 97607e01f..f0e467998 100644
--- a/apps/drec-api/ormconfig-certificate.ts
+++ b/apps/drec-api/ormconfig-certificate.ts
@@ -1,18 +1,23 @@
-import { ConnectionOptions } from 'typeorm';
-import { getDBConnectionOptions } from '@energyweb/origin-backend-utils';
-
-// Import the configuration from @energyweb/issuer-api
-const { synchronize, migrationsRun, migrationsTableName, ...dbConfig } = require('@energyweb/origin-247-certificate/dist/js/ormconfig.js');
-
-// Create your custom DataSourceOptions object
-const config: ConnectionOptions = {
- ...dbConfig,
- synchronize: false,
- migrationsRun: true,
- migrationsTableName,
- // Add any other DataSourceOptions properties if needed
-};
-
-const dataSource = config;
-
-export default dataSource;
\ No newline at end of file
+import { ConnectionOptions } from 'typeorm';
+import { getDBConnectionOptions } from '@energyweb/origin-backend-utils';
+
+// Import the configuration from @energyweb/issuer-api
+const {
+ synchronize,
+ migrationsRun,
+ migrationsTableName,
+ ...dbConfig
+} = require('@energyweb/origin-247-certificate/dist/js/ormconfig.js');
+
+// Create your custom DataSourceOptions object
+const config: ConnectionOptions = {
+ ...dbConfig,
+ synchronize: false,
+ migrationsRun: true,
+ migrationsTableName,
+ // Add any other DataSourceOptions properties if needed
+};
+
+const dataSource = config;
+
+export default dataSource;
diff --git a/apps/drec-api/ormconfig-issuer-api.ts b/apps/drec-api/ormconfig-issuer-api.ts
index fdf8012e3..578f18f55 100644
--- a/apps/drec-api/ormconfig-issuer-api.ts
+++ b/apps/drec-api/ormconfig-issuer-api.ts
@@ -1,18 +1,23 @@
-import { ConnectionOptions} from 'typeorm';
-import { getDBConnectionOptions } from '@energyweb/origin-backend-utils';
-
-// Import the configuration from @energyweb/issuer-api
-const { synchronize, migrationsRun, migrationsTableName, ...dbConfig } = require('@energyweb/issuer-api/dist/js/ormconfig.js');
-
-// Create your custom DataSourceOptions object
-const config: ConnectionOptions = {
- ...dbConfig,
- synchronize: false,
- migrationsRun: true,
- migrationsTableName,
- // Add any other DataSourceOptions properties if needed
-};
-
-const dataSource = config;
-
-export default dataSource;
\ No newline at end of file
+import { ConnectionOptions } from 'typeorm';
+import { getDBConnectionOptions } from '@energyweb/origin-backend-utils';
+
+// Import the configuration from @energyweb/issuer-api
+const {
+ synchronize,
+ migrationsRun,
+ migrationsTableName,
+ ...dbConfig
+} = require('@energyweb/issuer-api/dist/js/ormconfig.js');
+
+// Create your custom DataSourceOptions object
+const config: ConnectionOptions = {
+ ...dbConfig,
+ synchronize: false,
+ migrationsRun: true,
+ migrationsTableName,
+ // Add any other DataSourceOptions properties if needed
+};
+
+const dataSource = config;
+
+export default dataSource;
diff --git a/apps/drec-api/src/pods/device/device.controller.ts b/apps/drec-api/src/pods/device/device.controller.ts
index 80735525c..418947944 100755
--- a/apps/drec-api/src/pods/device/device.controller.ts
+++ b/apps/drec-api/src/pods/device/device.controller.ts
@@ -400,13 +400,22 @@ export class DeviceController {
})
async getByExternalId(
@Param('id') id: string,
- @UserDecorator() { organizationId }: ILoggedInUser,
+ @UserDecorator() loginUser: ILoggedInUser,
): Promise {
this.logger.verbose(`With in getByExternalId`);
- const devicedata = await this.deviceService.findDeviceByDeveloperExternalId(
- id,
- organizationId,
- );
+ let devicedata: Device;
+ if (loginUser.role === Role.ApiUser) {
+ devicedata =
+ await this.deviceService.findDeviceByDeveloperExternalIByApiUser(
+ id,
+ loginUser.api_user_id,
+ );
+ } else {
+ devicedata = await this.deviceService.findDeviceByDeveloperExternalId(
+ id,
+ loginUser.organizationId,
+ );
+ }
devicedata.externalId = devicedata.developerExternalId;
delete devicedata['developerExternalId'];
return devicedata;
diff --git a/apps/drec-api/src/pods/device/device.service.ts b/apps/drec-api/src/pods/device/device.service.ts
index d37ad2b3b..cb083c1a8 100755
--- a/apps/drec-api/src/pods/device/device.service.ts
+++ b/apps/drec-api/src/pods/device/device.service.ts
@@ -495,6 +495,29 @@ export class DeviceService {
);
return device;
}
+
+ async findDeviceByDeveloperExternalIByApiUser(
+ meterId: string,
+ api_user_id: string,
+ ): Promise {
+ this.logger.verbose(`With in findDeviceByDeveloperExternalIByApiUser`);
+ const device: Device = await this.repository.findOne({
+ where: {
+ developerExternalId: meterId,
+ api_user_id: api_user_id,
+ },
+ });
+ if (!device) {
+ this.logger.warn(`Returning null`);
+ return null;
+ }
+ device.timezone = await getLocalTimeZoneFromDevice(
+ device.createdAt,
+ device,
+ );
+ return device;
+ }
+
async findMultipleDevicesBasedExternalId(
meterIdList: Array,
organizationId: number,
diff --git a/apps/drec-api/src/pods/issuer/issuer.service.ts b/apps/drec-api/src/pods/issuer/issuer.service.ts
index 8e28da763..d4c2d5d0f 100755
--- a/apps/drec-api/src/pods/issuer/issuer.service.ts
+++ b/apps/drec-api/src/pods/issuer/issuer.service.ts
@@ -429,6 +429,8 @@ export class IssuerService {
) {
await this.groupService.deactiveReaservation(group);
}
+ } else {
+ await this.groupService.deactiveReaservation(group);
}
}
},
diff --git a/buildspec.yml b/buildspec.yml
index 85d6fdaf9..3fa2508e3 100755
--- a/buildspec.yml
+++ b/buildspec.yml
@@ -1,30 +1,30 @@
-version: 0.2
-env:
- parameter-store:
- docker_username: /powertrust/docker/username
- docker_password: /powertrust/docker/password
-phases:
- install:
- on-failure: ABORT
- # runtime-versions:
- # nodejs: 18
- # docker: 18
- commands:
- - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://127.0.0.1:2375 --storage-driver=overlay2 &
- - timeout 15 sh -c "until docker info; do echo .; sleep 1; done"
- - curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
- - chmod +x ./kubectl
- - curl -Lo aws-iam-authenticator https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v0.5.9/aws-iam-authenticator_0.5.9_linux_amd64
- - chmod +x ./aws-iam-authenticator
- - export PATH=$PWD/:$PATH
- pre_build:
- on-failure: ABORT
- commands:
- - export KUBECONFIG=$HOME/.kube/config
- - aws eks update-kubeconfig --name drec
- build:
- on-failure: ABORT
- commands:
- - echo $docker_password | docker login --username $docker_username --password-stdin
- - chmod +x ./buildscript.sh
- - ./buildscript.sh drec-api $environment
+version: 0.2
+env:
+ parameter-store:
+ docker_username: /powertrust/docker/username
+ docker_password: /powertrust/docker/password
+phases:
+ install:
+ on-failure: ABORT
+ # runtime-versions:
+ # nodejs: 18
+ # docker: 18
+ commands:
+ - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://127.0.0.1:2375 --storage-driver=overlay2 &
+ - timeout 15 sh -c "until docker info; do echo .; sleep 1; done"
+ - curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
+ - chmod +x ./kubectl
+ - curl -Lo aws-iam-authenticator https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v0.5.9/aws-iam-authenticator_0.5.9_linux_amd64
+ - chmod +x ./aws-iam-authenticator
+ - export PATH=$PWD/:$PATH
+ pre_build:
+ on-failure: ABORT
+ commands:
+ - export KUBECONFIG=$HOME/.kube/config
+ - aws eks update-kubeconfig --name drec
+ build:
+ on-failure: ABORT
+ commands:
+ - echo $docker_password | docker login --username $docker_username --password-stdin
+ - chmod +x ./buildscript.sh
+ - ./buildscript.sh drec-api $environment
diff --git a/common/autoinstallers/rush-prettier/package.json b/common/autoinstallers/rush-prettier/package.json
index 71712ccbe..e09a40882 100755
--- a/common/autoinstallers/rush-prettier/package.json
+++ b/common/autoinstallers/rush-prettier/package.json
@@ -1,9 +1,9 @@
{
- "name": "rush-prettier",
- "version": "1.0.0",
- "private": true,
- "dependencies": {
- "prettier": "2.3.2",
- "pretty-quick": "3.1.1"
- }
+ "name": "rush-prettier",
+ "version": "1.0.0",
+ "private": true,
+ "dependencies": {
+ "prettier": "2.3.2",
+ "pretty-quick": "3.1.1"
+ }
}
diff --git a/dependabot.yml b/dependabot.yml
index 43269e31e..adfcc0628 100644
--- a/dependabot.yml
+++ b/dependabot.yml
@@ -1,8 +1,8 @@
-version: 2
-updates:
- - package-ecosystem: "npm"
- directory: "./apps/drec-api"
- schedule:
- interval: "daily"
- labels:
- - "dependencies"
\ No newline at end of file
+version: 2
+updates:
+ - package-ecosystem: npm
+ directory: ./apps/drec-api
+ schedule:
+ interval: daily
+ labels:
+ - dependencies
diff --git a/docker-compose.yml b/docker-compose.yml
index 9f56807f2..470ea1bf7 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,39 +1,39 @@
-version: '3.8'
-
-services:
- drec-postgres:
- image: postgres:latest
- container_name: drec-postgres
- environment:
- POSTGRES_DB: origin
- POSTGRES_USER: postgres
- POSTGRES_PASSWORD: postgres
- ports:
- - "5432:5432"
- volumes:
- - postgres-data:/var/lib/postgresql/data
-
- drec-redis:
- image: redis:latest
- container_name: drec-redis
- ports:
- - "6379:6379"
-
- drec-influxdb:
- image: influxdb:1.8
- container_name: drec-influxdb
- environment:
- INFLUXDB_DB: energy
- INFLUXDB_ADMIN_USER: test
- INFLUXDB_ADMIN_PASSWORD: test
- INFLUXDB_USER: api
- INFLUXDB_USER_PASSWORD: secret
- ports:
- - "8086:8086"
- volumes:
- - influxdb-data:/var/lib/influxdb
- - ./influxdb.conf:/etc/influxdb/influxdb.conf
-
-volumes:
- postgres-data:
- influxdb-data:
\ No newline at end of file
+version: "3.8"
+
+services:
+ drec-postgres:
+ image: postgres:latest
+ container_name: drec-postgres
+ environment:
+ POSTGRES_DB: origin
+ POSTGRES_USER: postgres
+ POSTGRES_PASSWORD: postgres
+ ports:
+ - 5432:5432
+ volumes:
+ - postgres-data:/var/lib/postgresql/data
+
+ drec-redis:
+ image: redis:latest
+ container_name: drec-redis
+ ports:
+ - 6379:6379
+
+ drec-influxdb:
+ image: influxdb:1.8
+ container_name: drec-influxdb
+ environment:
+ INFLUXDB_DB: energy
+ INFLUXDB_ADMIN_USER: test
+ INFLUXDB_ADMIN_PASSWORD: test
+ INFLUXDB_USER: api
+ INFLUXDB_USER_PASSWORD: secret
+ ports:
+ - 8086:8086
+ volumes:
+ - influxdb-data:/var/lib/influxdb
+ - ./influxdb.conf:/etc/influxdb/influxdb.conf
+
+volumes:
+ postgres-data:
+ influxdb-data:
diff --git a/docs/.vitepress/config.mjs b/docs/.vitepress/config.mjs
index cd8cda849..8b99ca16b 100644
--- a/docs/.vitepress/config.mjs
+++ b/docs/.vitepress/config.mjs
@@ -3,47 +3,50 @@ import { generateSidebar } from 'vitepress-sidebar';
// https://vitepress-sidebar.jooy2.com/getting-started
const vitepressSidebarOptions = {
- excludeFiles: 'README.md',
- excludeFilesByFrontmatter: true,
- sortMenusByFrontmatterOrder: true,
- useFolderTitleFromIndexFile: true,
- useTitleFromFileHeading: true,
- useTitleFromFrontmatter: true
+ excludeFiles: 'README.md',
+ excludeFilesByFrontmatter: true,
+ sortMenusByFrontmatterOrder: true,
+ useFolderTitleFromIndexFile: true,
+ useTitleFromFileHeading: true,
+ useTitleFromFrontmatter: true,
};
// https://vitepress.dev/reference/site-config
export default defineConfig({
- title: 'D-REC Docs',
- description: 'Documentation for the D-REC (Distributed Renewable Energy Certificates) platform',
+ title: 'D-REC Docs',
+ description:
+ 'Documentation for the D-REC (Distributed Renewable Energy Certificates) platform',
+
+ head: [['link', { rel: 'icon', type: 'image/png', href: 'favicon.png' }]],
+
+ // For hosting on Github pages
+ // https://vitepress.dev/guide/deploy#github-pages
+ base: '/drec-origin/',
+ vite: {
+ publicDir: '.public',
+ },
+ srcExclude: ['README.md'],
+
+ themeConfig: {
+ // https://vitepress.dev/reference/default-theme-config
+ logo: '/D-REC-banner.png',
+ nav: [
+ { text: 'Home', link: '/' },
+ { text: 'Documentation', link: '/introduction/technology-overview' },
+ ],
+ footer: {
+ message: 'Built with VitePress ❤️.',
+ copyright: `Copyright © ${new Date().getFullYear()} D-REC Initiative.`,
+ },
+
+ sidebar: generateSidebar(vitepressSidebarOptions),
- head: [['link', { rel: 'icon', type: 'image/png', href: 'favicon.png' }]],
+ socialLinks: [
+ { icon: 'github', link: 'https://github.com/d-rec/drec-origin' },
+ ],
- // For hosting on Github pages
- // https://vitepress.dev/guide/deploy#github-pages
- base: '/drec-origin/',
- vite: {
- publicDir: '.public'
+ search: {
+ provider: 'local',
},
- srcExclude: ['README.md'],
-
- themeConfig: {
- // https://vitepress.dev/reference/default-theme-config
- logo: '/D-REC-banner.png',
- nav: [
- { text: 'Home', link: '/' },
- { text: 'Documentation', link: '/introduction/technology-overview' }
- ],
- footer: {
- message: 'Built with VitePress ❤️.',
- copyright: `Copyright © ${new Date().getFullYear()} D-REC Initiative.`
- },
-
- sidebar: generateSidebar(vitepressSidebarOptions),
-
- socialLinks: [{ icon: 'github', link: 'https://github.com/d-rec/drec-origin' }],
-
- search: {
- provider: 'local'
- }
- }
+ },
});
diff --git a/docs/.vitepress/theme/custom.css b/docs/.vitepress/theme/custom.css
index c34a419f8..3a7a5e9a9 100644
--- a/docs/.vitepress/theme/custom.css
+++ b/docs/.vitepress/theme/custom.css
@@ -44,99 +44,99 @@
* -------------------------------------------------------------------------- */
:root {
- --vp-c-brand-1: #eac046;
- --vp-c-brand-2: #c47f2e;
- --vp-c-brand-3: #eac046;
- /* --vp-c-brand-soft: var(--vp-c-indigo-soft); */
+ --vp-c-brand-1: #eac046;
+ --vp-c-brand-2: #c47f2e;
+ --vp-c-brand-3: #eac046;
+ /* --vp-c-brand-soft: var(--vp-c-indigo-soft); */
}
/**
* Component: Home
* -------------------------------------------------------------------------- */
:root {
- --vp-home-hero-name-color: transparent;
- --vp-home-hero-name-background: -webkit-linear-gradient(
- 120deg,
- var(--vp-c-brand-2) 30%,
- var(--vp-c-brand-1)
- );
+ --vp-home-hero-name-color: transparent;
+ --vp-home-hero-name-background: -webkit-linear-gradient(
+ 120deg,
+ var(--vp-c-brand-2) 30%,
+ var(--vp-c-brand-1)
+ );
- --vp-home-hero-image-background-image: linear-gradient(
- -45deg,
- var(--vp-c-gray-1),
- var(--vp-c-brand-1) 100%
- );
- --vp-home-hero-image-filter: blur(44px);
+ --vp-home-hero-image-background-image: linear-gradient(
+ -45deg,
+ var(--vp-c-gray-1),
+ var(--vp-c-brand-1) 100%
+ );
+ --vp-home-hero-image-filter: blur(44px);
}
/**
* Component: Custom Block
* -------------------------------------------------------------------------- */
:root {
- /* Custom block colors inspired by Github colors*/
- --vp-custom-block-info-border: transparent;
- --vp-custom-block-info-text: var(--vp-c-text-1);
- --vp-custom-block-info-bg: var(--vp-c-indigo-soft);
- --vp-custom-block-info-code-bg: var(--vp-c-indigo-soft);
+ /* Custom block colors inspired by Github colors*/
+ --vp-custom-block-info-border: transparent;
+ --vp-custom-block-info-text: var(--vp-c-text-1);
+ --vp-custom-block-info-bg: var(--vp-c-indigo-soft);
+ --vp-custom-block-info-code-bg: var(--vp-c-indigo-soft);
- --vp-custom-block-note-border: transparent;
- --vp-custom-block-note-text: var(--vp-c-text-1);
- --vp-custom-block-note-bg: var(--vp-c-default-soft);
- --vp-custom-block-note-code-bg: var(--vp-c-default-soft);
+ --vp-custom-block-note-border: transparent;
+ --vp-custom-block-note-text: var(--vp-c-text-1);
+ --vp-custom-block-note-bg: var(--vp-c-default-soft);
+ --vp-custom-block-note-code-bg: var(--vp-c-default-soft);
- --vp-custom-block-tip-border: transparent;
- --vp-custom-block-tip-text: var(--vp-c-text-1);
- --vp-custom-block-tip-bg: var(--vp-c-green-soft);
- --vp-custom-block-tip-code-bg: var(--vp-c-green-soft);
+ --vp-custom-block-tip-border: transparent;
+ --vp-custom-block-tip-text: var(--vp-c-text-1);
+ --vp-custom-block-tip-bg: var(--vp-c-green-soft);
+ --vp-custom-block-tip-code-bg: var(--vp-c-green-soft);
}
/* Docusaurus style borders */
.custom-block.note {
- border: 0px solid;
- /* --vp-c-gray-1 is too light*/
- border-color: var(--vp-c-gray-1);
- border-left-width: 5px;
- box-shadow: var(--vp-shadow-1);
+ border: 0px solid;
+ /* --vp-c-gray-1 is too light*/
+ border-color: var(--vp-c-gray-1);
+ border-left-width: 5px;
+ box-shadow: var(--vp-shadow-1);
}
.custom-block.info {
- border: 0px solid;
- border-color: var(--vp-c-indigo-3);
- border-left-width: 5px;
- box-shadow: var(--vp-shadow-1);
+ border: 0px solid;
+ border-color: var(--vp-c-indigo-3);
+ border-left-width: 5px;
+ box-shadow: var(--vp-shadow-1);
}
.custom-block.warning {
- border: 0px solid;
- border-color: var(--vp-c-yellow-3);
- border-left-width: 5px;
- box-shadow: var(--vp-shadow-1);
+ border: 0px solid;
+ border-color: var(--vp-c-yellow-3);
+ border-left-width: 5px;
+ box-shadow: var(--vp-shadow-1);
}
.custom-block.tip {
- border: 0px solid;
- border-color: var(--vp-c-green-3);
- border-left-width: 5px;
- box-shadow: var(--vp-shadow-1);
+ border: 0px solid;
+ border-color: var(--vp-c-green-3);
+ border-left-width: 5px;
+ box-shadow: var(--vp-shadow-1);
}
.custom-block.important {
- border: 0px solid;
- border-color: var(--vp-c-purple-3);
- border-left-width: 5px;
- box-shadow: var(--vp-shadow-1);
+ border: 0px solid;
+ border-color: var(--vp-c-purple-3);
+ border-left-width: 5px;
+ box-shadow: var(--vp-shadow-1);
}
.custom-block.caution {
- border: 0px solid;
- border-color: var(--vp-c-red-3);
- border-left-width: 5px;
- box-shadow: var(--vp-shadow-1);
+ border: 0px solid;
+ border-color: var(--vp-c-red-3);
+ border-left-width: 5px;
+ box-shadow: var(--vp-shadow-1);
}
.custom-block.danger {
- border: 0px solid;
- border-color: var(--vp-c-red-3);
- border-left-width: 5px;
- box-shadow: var(--vp-shadow-1);
+ border: 0px solid;
+ border-color: var(--vp-c-red-3);
+ border-left-width: 5px;
+ box-shadow: var(--vp-shadow-1);
}
diff --git a/docs/.vitepress/theme/index.js b/docs/.vitepress/theme/index.js
index 457050c73..932d00d1f 100644
--- a/docs/.vitepress/theme/index.js
+++ b/docs/.vitepress/theme/index.js
@@ -5,13 +5,13 @@ import './custom.css';
/** @type {import('vitepress').Theme} */
export default {
- extends: DefaultTheme,
- Layout: () => {
- return h(DefaultTheme.Layout, null, {
- // https://vitepress.dev/guide/extending-default-theme#layout-slots
- });
- },
- enhanceApp({ app, router, siteData }) {
- // ...
- }
+ extends: DefaultTheme,
+ Layout: () => {
+ return h(DefaultTheme.Layout, null, {
+ // https://vitepress.dev/guide/extending-default-theme#layout-slots
+ });
+ },
+ enhanceApp({ app, router, siteData }) {
+ // ...
+ },
};
diff --git a/docs/index.md b/docs/index.md
index 541a5120d..b545e467f 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -3,31 +3,31 @@
layout: home
hero:
- name: 'D-REC Initiative'
- text: 'Documentation for the D-REC platform'
- tagline: Distributed Renewable Energy Certificates
- actions:
- - theme: brand
- text: Documentation
- link: /introduction/technology-overview
- - theme: alt
- text: Get Started
- link: /usage_guide/get-started
- - theme: alt
- text: API Documentation
- link: https://dev-api.drecs.org/swagger/
- image:
- src: /D-REC-logo.png
- alt: VitePress
+ name: 'D-REC Initiative'
+ text: 'Documentation for the D-REC platform'
+ tagline: Distributed Renewable Energy Certificates
+ actions:
+ - theme: brand
+ text: Documentation
+ link: /introduction/technology-overview
+ - theme: alt
+ text: Get Started
+ link: /usage_guide/get-started
+ - theme: alt
+ text: API Documentation
+ link: https://dev-api.drecs.org/swagger/
+ image:
+ src: /D-REC-logo.png
+ alt: VitePress
features:
- - icon: 👥
- title: What we do
- details: Our core mechanism, the Distributed Renewable Energy Certificate (D-REC), is an innovative market instrument designed to issue Environmental Attribute Certificates (EACs) from small-scale DRE resources. These D-RECs represent a tangible commitment not only to environmental sustainability but also to energy access with a correlation to socio-economic upliftment in underserved communities.
- - icon: ⚡️
- title: Our impact
- details: The D-REC Organization is more than just a facilitator of RECs. Through D-RECs, we deepen the corporate climate action to enable small-scale DRE projects to become economically viable and environmentally impactful. Our work not only contributes to meeting global sustainability targets but also ensures that the benefits of renewable energy reach those who need it most.
- - icon: 🙏
- title: Our approach
- details: Leveraging technology and innovation, we have built a robust platform that streamlines the aggregation and verification process of DRE projects, enabling their certification by relevant bodies.
+ - icon: 👥
+ title: What we do
+ details: Our core mechanism, the Distributed Renewable Energy Certificate (D-REC), is an innovative market instrument designed to issue Environmental Attribute Certificates (EACs) from small-scale DRE resources. These D-RECs represent a tangible commitment not only to environmental sustainability but also to energy access with a correlation to socio-economic upliftment in underserved communities.
+ - icon: ⚡️
+ title: Our impact
+ details: The D-REC Organization is more than just a facilitator of RECs. Through D-RECs, we deepen the corporate climate action to enable small-scale DRE projects to become economically viable and environmentally impactful. Our work not only contributes to meeting global sustainability targets but also ensures that the benefits of renewable energy reach those who need it most.
+ - icon: 🙏
+ title: Our approach
+ details: Leveraging technology and innovation, we have built a robust platform that streamlines the aggregation and verification process of DRE projects, enabling their certification by relevant bodies.
---
diff --git a/drec-api.yaml b/drec-api.yaml
index 150ca0be6..56212c9e4 100755
--- a/drec-api.yaml
+++ b/drec-api.yaml
@@ -14,11 +14,11 @@ spec:
app.kubernetes.io/name: drec-api
spec:
containers:
- - image: 895706603967.dkr.ecr.eu-west-1.amazonaws.com/drec-api:{{BUILD_NUMBER}}
- imagePullPolicy: Always
- name: drec-api
- ports:
- - containerPort: 80
+ - image: 895706603967.dkr.ecr.eu-west-1.amazonaws.com/drec-api:{{BUILD_NUMBER}}
+ imagePullPolicy: Always
+ name: drec-api
+ ports:
+ - containerPort: 80
---
apiVersion: v1
kind: Service
diff --git a/integrators-scripts/auth.js b/integrators-scripts/auth.js
index c370e9911..b5b7af345 100755
--- a/integrators-scripts/auth.js
+++ b/integrators-scripts/auth.js
@@ -5,65 +5,65 @@ const axios = require('axios');
const server = process.env.DREC_BACKEND_URL;
const login = async (username, password) => {
- const auth = {
- username: username,
- password: password
- };
- try {
- const resp = await axios.post(`${server}/auth/login`, auth);
- return resp.data.accessToken;
- } catch (err) {
- console.error('Error: ', err);
- }
+ const auth = {
+ username: username,
+ password: password,
+ };
+ try {
+ const resp = await axios.post(`${server}/auth/login`, auth);
+ return resp.data.accessToken;
+ } catch (err) {
+ console.error('Error: ', err);
+ }
};
const loginOkra = async () => {
- const username = process.env.OKRA_USERNAME;
- const password = process.env.OKRA_PASSWORD;
- const apiToken = await login(username, password);
- return apiToken;
+ const username = process.env.OKRA_USERNAME;
+ const password = process.env.OKRA_PASSWORD;
+ const apiToken = await login(username, password);
+ return apiToken;
};
const loginNSR = async () => {
- const username = process.env.NSR_USERNAME;
- const password = process.env.NSR_PASSWORD;
- const apiToken = await login(username, password);
- return apiToken;
+ const username = process.env.NSR_USERNAME;
+ const password = process.env.NSR_PASSWORD;
+ const apiToken = await login(username, password);
+ return apiToken;
};
const loginEngie = async () => {
- const username = process.env.ENGIE_USERNAME;
- const password = process.env.ENGIE_PASSWORD;
- const apiToken = await login(username, password);
- return apiToken;
+ const username = process.env.ENGIE_USERNAME;
+ const password = process.env.ENGIE_PASSWORD;
+ const apiToken = await login(username, password);
+ return apiToken;
};
const loginDistributedEnergy = async () => {
- const username = process.env.DE_USERNAME;
- const password = process.env.DE_PASSWORD;
- const apiToken = await login(username, password);
- return apiToken;
+ const username = process.env.DE_USERNAME;
+ const password = process.env.DE_PASSWORD;
+ const apiToken = await login(username, password);
+ return apiToken;
};
const loginCandi = async () => {
- const username = process.env.CANDI_USERNAME;
- const password = process.env.CANDI_PASSWORD;
- const apiToken = await login(username, password);
- return apiToken;
+ const username = process.env.CANDI_USERNAME;
+ const password = process.env.CANDI_PASSWORD;
+ const apiToken = await login(username, password);
+ return apiToken;
};
const loginBBOX = async () => {
- const username = process.env.BBOX_USERNAME;
- const password = process.env.BBOX_PASSWORD;
- const apiToken = await login(username, password);
- return apiToken;
+ const username = process.env.BBOX_USERNAME;
+ const password = process.env.BBOX_PASSWORD;
+ const apiToken = await login(username, password);
+ return apiToken;
};
module.exports = {
- loginOkra,
- loginNSR,
- loginEngie,
- loginDistributedEnergy,
- loginCandi,
- loginBBOX
+ loginOkra,
+ loginNSR,
+ loginEngie,
+ loginDistributedEnergy,
+ loginCandi,
+ loginBBOX,
};
diff --git a/integrators-scripts/device-generator.js b/integrators-scripts/device-generator.js
index 3412e1bea..cf7a84eac 100755
--- a/integrators-scripts/device-generator.js
+++ b/integrators-scripts/device-generator.js
@@ -13,182 +13,185 @@ const bboxProducts = require('./integrator-products/BBOX-products.json');
const integrators = require('./integrators');
const getIntegratorDefaultValues = (obj, integrator) => {
- switch (integrator) {
- case integrators.Integrator.OKRA:
- return {
- externalId: obj.externalId,
- projectName: obj.externalId,
- latitude: obj.latitude,
- longitude: obj.longitude,
- countryCode: obj.countryCode,
- capacity: obj.capacity,
- // Default values
- fuelCode: 'ES100',
- deviceTypeCode: 'TC120',
- installationConfiguration: 'StandAlone',
- commissioningDate: '2021-05-30',
- gridInterconnection: false,
- offTaker: 'Residential',
- sector: 'Residential',
- standardCompliance: 'I-REC',
- yieldValue: 1500,
- integrator: integrator,
- status: 'Active'
- };
- case integrators.Integrator.ENGIE:
- const formatDate = (date) => {
- const dateSplitted = date.split('/');
- return `${dateSplitted[2]}-${dateSplitted[1]}-${dateSplitted[0]}`;
- };
- return {
- externalId: obj.externalID,
- projectName: obj.projectName,
- latitude: obj.latitude,
- longitude: obj.longitude,
- countryCode: obj.countryCode,
- capacity: obj.capacity * 10 ** 3,
- address: obj.address,
- fuelCode: obj.fuelCode,
- deviceTypeCode: obj.deviceTypeCode,
- installationConfiguration: obj.installationconfiguration,
- gridInterconnection: obj.gridInterconnection,
- standardCompliance: obj.standardcompliance,
- commissioningDate: DateTime.fromJSDate(
- new Date(formatDate(obj.commissioningdate))
- ).toFormat('yyyy-MM-dd'),
- // Default values
- offTaker: 'Residential',
- sector: 'Residential',
- yieldValue: 1500,
- integrator: integrator,
- status: 'Active'
- };
- case integrators.Integrator.DISTRIBUTED_ENERGY:
- return {
- externalId: obj.externalId,
- projectName: obj.projectName,
- latitude: Number(obj.latitude),
- longitude: Number(obj.longitude),
- countryCode: obj.countryCode,
- capacity: obj.capacity * 10 ** 3,
- address: obj.address,
- fuelCode: obj.fuelCode,
- deviceTypeCode: obj.deviceTypeCode,
- installationConfiguration: obj.installationconfiguration,
- gridInterconnection: obj.gridInterconnection,
- standardCompliance: obj.standardCompliance,
- offTaker: obj.offTaker,
- sector: obj.sector,
- yieldValue: obj.yieldValue,
- commissioningDate: DateTime.fromJSDate(new Date(obj.commissioningDate)).toFormat(
- 'yyyy-MM-dd'
- ),
- // Default values
- integrator: integrator,
- status: 'Active',
- installationConfiguration: 'StandAlone'
- };
- case integrators.Integrator.NSR:
- return {
- externalId: obj.externalId,
- projectName: obj.projectName,
- latitude: Number(obj.latitude),
- longitude: Number(obj.longitude),
- countryCode: obj.countryCode,
- capacity: obj.capacity * 10 ** 3,
- fuelCode: obj.fuelCode,
- deviceTypeCode: obj.deviceTypeCode,
- installationConfiguration: obj.installationconfiguration,
- gridInterconnection: obj.gridInterconnection,
- standardCompliance: obj.standardcompliance,
- offTaker: obj.offTaker,
- sector: obj.sector,
- commissioningDate: DateTime.fromJSDate(new Date(obj.commissioningdate)).toFormat(
- 'yyyy-MM-dd'
- ),
- // Default values
- integrator: integrator,
- status: 'Active',
- yieldValue: 1500
- };
- case integrators.Integrator.CANDI:
- return {
- externalId: obj.externalId,
- projectName: obj.projectName,
- latitude: Number(obj.latitude),
- longitude: Number(obj.longitude),
- countryCode: obj.countryCode,
- capacity: parseInt(obj.capacity) * 10 ** 3,
- address: obj.address,
- zipCode: `${obj.zipCode}`,
- fuelCode: obj.fuelCode,
- deviceTypeCode: obj.deviceTypeCode,
- installationConfiguration: obj.installationConfiguration,
- gridInterconnection: obj.gridInterconnection,
- offTaker: obj.offTaker,
- sector: obj.sector,
- commissioningDate: DateTime.fromJSDate(new Date(obj.commissioningDate)).toFormat(
- 'yyyy-MM-dd'
- ),
- // Default values
- integrator: integrator,
- status: 'Active',
- yieldValue: 1500,
- standardCompliance: 'REC'
- };
- case integrators.Integrator.BBOX:
- return {
- externalId: obj.externalId,
- projectName: obj.projectName,
- latitude: Number(obj.latitude),
- longitude: Number(obj.longitude),
- countryCode: obj.countryCode,
- capacity: parseInt(obj.capacity),
- address: obj.address,
- zipCode: `${obj.zipCode}`,
- fuelCode: obj.fuelCode,
- deviceTypeCode: obj.deviceTypeCode,
- installationConfiguration: obj.installationConfiguration,
- gridInterconnection: obj.gridInterconnection,
- offTaker: obj.offTaker,
- sector: obj.sector,
- commissioningDate: DateTime.fromJSDate(new Date(obj.commissioningDate)).toFormat(
- 'yyyy-MM-dd'
- ),
- yieldValue: obj.yieldValue,
- standardCompliance: obj.standardCompliance,
- // Default values
- integrator: integrator,
- status: 'Active'
- };
- }
+ switch (integrator) {
+ case integrators.Integrator.OKRA:
+ return {
+ externalId: obj.externalId,
+ projectName: obj.externalId,
+ latitude: obj.latitude,
+ longitude: obj.longitude,
+ countryCode: obj.countryCode,
+ capacity: obj.capacity,
+ // Default values
+ fuelCode: 'ES100',
+ deviceTypeCode: 'TC120',
+ installationConfiguration: 'StandAlone',
+ commissioningDate: '2021-05-30',
+ gridInterconnection: false,
+ offTaker: 'Residential',
+ sector: 'Residential',
+ standardCompliance: 'I-REC',
+ yieldValue: 1500,
+ integrator: integrator,
+ status: 'Active',
+ };
+ case integrators.Integrator.ENGIE:
+ const formatDate = (date) => {
+ const dateSplitted = date.split('/');
+ return `${dateSplitted[2]}-${dateSplitted[1]}-${dateSplitted[0]}`;
+ };
+ return {
+ externalId: obj.externalID,
+ projectName: obj.projectName,
+ latitude: obj.latitude,
+ longitude: obj.longitude,
+ countryCode: obj.countryCode,
+ capacity: obj.capacity * 10 ** 3,
+ address: obj.address,
+ fuelCode: obj.fuelCode,
+ deviceTypeCode: obj.deviceTypeCode,
+ installationConfiguration: obj.installationconfiguration,
+ gridInterconnection: obj.gridInterconnection,
+ standardCompliance: obj.standardcompliance,
+ commissioningDate: DateTime.fromJSDate(
+ new Date(formatDate(obj.commissioningdate)),
+ ).toFormat('yyyy-MM-dd'),
+ // Default values
+ offTaker: 'Residential',
+ sector: 'Residential',
+ yieldValue: 1500,
+ integrator: integrator,
+ status: 'Active',
+ };
+ case integrators.Integrator.DISTRIBUTED_ENERGY:
+ return {
+ externalId: obj.externalId,
+ projectName: obj.projectName,
+ latitude: Number(obj.latitude),
+ longitude: Number(obj.longitude),
+ countryCode: obj.countryCode,
+ capacity: obj.capacity * 10 ** 3,
+ address: obj.address,
+ fuelCode: obj.fuelCode,
+ deviceTypeCode: obj.deviceTypeCode,
+ installationConfiguration: obj.installationconfiguration,
+ gridInterconnection: obj.gridInterconnection,
+ standardCompliance: obj.standardCompliance,
+ offTaker: obj.offTaker,
+ sector: obj.sector,
+ yieldValue: obj.yieldValue,
+ commissioningDate: DateTime.fromJSDate(
+ new Date(obj.commissioningDate),
+ ).toFormat('yyyy-MM-dd'),
+ // Default values
+ integrator: integrator,
+ status: 'Active',
+ installationConfiguration: 'StandAlone',
+ };
+ case integrators.Integrator.NSR:
+ return {
+ externalId: obj.externalId,
+ projectName: obj.projectName,
+ latitude: Number(obj.latitude),
+ longitude: Number(obj.longitude),
+ countryCode: obj.countryCode,
+ capacity: obj.capacity * 10 ** 3,
+ fuelCode: obj.fuelCode,
+ deviceTypeCode: obj.deviceTypeCode,
+ installationConfiguration: obj.installationconfiguration,
+ gridInterconnection: obj.gridInterconnection,
+ standardCompliance: obj.standardcompliance,
+ offTaker: obj.offTaker,
+ sector: obj.sector,
+ commissioningDate: DateTime.fromJSDate(
+ new Date(obj.commissioningdate),
+ ).toFormat('yyyy-MM-dd'),
+ // Default values
+ integrator: integrator,
+ status: 'Active',
+ yieldValue: 1500,
+ };
+ case integrators.Integrator.CANDI:
+ return {
+ externalId: obj.externalId,
+ projectName: obj.projectName,
+ latitude: Number(obj.latitude),
+ longitude: Number(obj.longitude),
+ countryCode: obj.countryCode,
+ capacity: parseInt(obj.capacity) * 10 ** 3,
+ address: obj.address,
+ zipCode: `${obj.zipCode}`,
+ fuelCode: obj.fuelCode,
+ deviceTypeCode: obj.deviceTypeCode,
+ installationConfiguration: obj.installationConfiguration,
+ gridInterconnection: obj.gridInterconnection,
+ offTaker: obj.offTaker,
+ sector: obj.sector,
+ commissioningDate: DateTime.fromJSDate(
+ new Date(obj.commissioningDate),
+ ).toFormat('yyyy-MM-dd'),
+ // Default values
+ integrator: integrator,
+ status: 'Active',
+ yieldValue: 1500,
+ standardCompliance: 'REC',
+ };
+ case integrators.Integrator.BBOX:
+ return {
+ externalId: obj.externalId,
+ projectName: obj.projectName,
+ latitude: Number(obj.latitude),
+ longitude: Number(obj.longitude),
+ countryCode: obj.countryCode,
+ capacity: parseInt(obj.capacity),
+ address: obj.address,
+ zipCode: `${obj.zipCode}`,
+ fuelCode: obj.fuelCode,
+ deviceTypeCode: obj.deviceTypeCode,
+ installationConfiguration: obj.installationConfiguration,
+ gridInterconnection: obj.gridInterconnection,
+ offTaker: obj.offTaker,
+ sector: obj.sector,
+ commissioningDate: DateTime.fromJSDate(
+ new Date(obj.commissioningDate),
+ ).toFormat('yyyy-MM-dd'),
+ yieldValue: obj.yieldValue,
+ standardCompliance: obj.standardCompliance,
+ // Default values
+ integrator: integrator,
+ status: 'Active',
+ };
+ }
};
const transform = (arr, integrator) => {
- if (!arr.length) {
- return;
- }
- const devices = arr.map((obj) => {
- return getIntegratorDefaultValues(obj, integrator);
- });
- return devices;
+ if (!arr.length) {
+ return;
+ }
+ const devices = arr.map((obj) => {
+ return getIntegratorDefaultValues(obj, integrator);
+ });
+ return devices;
};
const generateIntegratorDevices = (arr, integrator) => {
- const devices = transform(arr, integrator);
- let data = JSON.stringify(devices);
- fs.writeFileSync(`./integrator-devices/${integrator}-devices.json`, data);
+ const devices = transform(arr, integrator);
+ let data = JSON.stringify(devices);
+ fs.writeFileSync(`./integrator-devices/${integrator}-devices.json`, data);
};
const runGenerateIntegrators = () => {
- generateIntegratorDevices(okraProducts, integrators.Integrator.OKRA);
- generateIntegratorDevices(engieProducts, integrators.Integrator.ENGIE);
- generateIntegratorDevices(distributedEnergyProducts, integrators.Integrator.DISTRIBUTED_ENERGY);
- generateIntegratorDevices(nsrProducts, integrators.Integrator.NSR);
- generateIntegratorDevices(candiProducts, integrators.Integrator.CANDI);
- generateIntegratorDevices(bboxProducts, integrators.Integrator.BBOX);
+ generateIntegratorDevices(okraProducts, integrators.Integrator.OKRA);
+ generateIntegratorDevices(engieProducts, integrators.Integrator.ENGIE);
+ generateIntegratorDevices(
+ distributedEnergyProducts,
+ integrators.Integrator.DISTRIBUTED_ENERGY,
+ );
+ generateIntegratorDevices(nsrProducts, integrators.Integrator.NSR);
+ generateIntegratorDevices(candiProducts, integrators.Integrator.CANDI);
+ generateIntegratorDevices(bboxProducts, integrators.Integrator.BBOX);
};
module.exports = {
- runGenerateIntegrators
+ runGenerateIntegrators,
};
diff --git a/integrators-scripts/index.js b/integrators-scripts/index.js
index 58430d7e7..fd0f937aa 100755
--- a/integrators-scripts/index.js
+++ b/integrators-scripts/index.js
@@ -12,25 +12,25 @@ const postDevices = require('./post-devices');
3. You updated DREC_USERNAME & DREC_PASSWORD with the Owner credentials based on the integrator (Okra, BBOX, Engie etc.)
*/
(async () => {
- // These methods should run independently
- // After each step, comment the completed step, uncomment the next step and restart the server
- // Run this 1st - This will create JSON files for each developer
- // deviceGenerator.runGenerateIntegrators();
- // Run this 2nd - This will upload all devices for each developer in the specified environment
- // await postDevices.postOkraDevices();
- // await postDevices.postNSRDevices();
- // await postDevices.postDistributedEnergyDevices();
- // await postDevices.postCandiDevices();
- // await postDevices.postEngieDevices();
- // await postDevices.postBBOXDevices();
- // Run this 3rd - This will upload meter reads for each device
- // await postReads.postOkraReads();
- // await postReads.postNSRReads();
- // await postReads.postEngieReads();
- // await postReads.postDistributedEnergyReads();
- // await postReads.postCandiReads();
- // Run this 4th for daily reads - This will upload daily meter reds for each deie
- // await postReads.postOkraReadsDAILY();
- // await postReads.postNSRReadsDAILY();
- // await postReads.postCandiReadsDAILY();
+ // These methods should run independently
+ // After each step, comment the completed step, uncomment the next step and restart the server
+ // Run this 1st - This will create JSON files for each developer
+ // deviceGenerator.runGenerateIntegrators();
+ // Run this 2nd - This will upload all devices for each developer in the specified environment
+ // await postDevices.postOkraDevices();
+ // await postDevices.postNSRDevices();
+ // await postDevices.postDistributedEnergyDevices();
+ // await postDevices.postCandiDevices();
+ // await postDevices.postEngieDevices();
+ // await postDevices.postBBOXDevices();
+ // Run this 3rd - This will upload meter reads for each device
+ // await postReads.postOkraReads();
+ // await postReads.postNSRReads();
+ // await postReads.postEngieReads();
+ // await postReads.postDistributedEnergyReads();
+ // await postReads.postCandiReads();
+ // Run this 4th for daily reads - This will upload daily meter reds for each deie
+ // await postReads.postOkraReadsDAILY();
+ // await postReads.postNSRReadsDAILY();
+ // await postReads.postCandiReadsDAILY();
})();
diff --git a/integrators-scripts/integrator-devices/BBOX-devices-sample.json b/integrators-scripts/integrator-devices/BBOX-devices-sample.json
index 3721d9fd3..e04fb3aea 100755
--- a/integrators-scripts/integrator-devices/BBOX-devices-sample.json
+++ b/integrators-scripts/integrator-devices/BBOX-devices-sample.json
@@ -1,43 +1,42 @@
[
- {
- "externalId": "null",
- "projectName": "null",
- "latitude": 8.1147031,
- "longitude": 1.1513303,
- "countryCode": "TG",
- "capacity": 20,
- "zipCode": "undefined",
- "fuelCode": "ES100",
- "deviceTypeCode": "",
- "installationConfiguration": "null",
- "gridInterconnection": false,
- "offTaker": "null",
- "sector": "null",
- "commissioningDate": "null",
- "yieldValue": 1500,
- "standardCompliance": "C",
- "integrator": "null",
- "status": "Active"
- },
- {
- "externalId": "null",
- "projectName": "null",
- "latitude": 7.7593846,
- "longitude": 1.1961276,
- "countryCode": "TG",
- "capacity": 20,
- "zipCode": "undefined",
- "fuelCode": "null",
- "deviceTypeCode": "null",
- "installationConfiguration": "StandAlone",
- "gridInterconnection": false,
- "offTaker": "Residential",
- "sector": "",
- "commissioningDate": "2021-01-06",
- "yieldValue": 1500,
- "standardCompliance": "I-REC",
- "integrator": "null",
- "status": "Active"
- }
-
+ {
+ "externalId": "null",
+ "projectName": "null",
+ "latitude": 8.1147031,
+ "longitude": 1.1513303,
+ "countryCode": "TG",
+ "capacity": 20,
+ "zipCode": "undefined",
+ "fuelCode": "ES100",
+ "deviceTypeCode": "",
+ "installationConfiguration": "null",
+ "gridInterconnection": false,
+ "offTaker": "null",
+ "sector": "null",
+ "commissioningDate": "null",
+ "yieldValue": 1500,
+ "standardCompliance": "C",
+ "integrator": "null",
+ "status": "Active"
+ },
+ {
+ "externalId": "null",
+ "projectName": "null",
+ "latitude": 7.7593846,
+ "longitude": 1.1961276,
+ "countryCode": "TG",
+ "capacity": 20,
+ "zipCode": "undefined",
+ "fuelCode": "null",
+ "deviceTypeCode": "null",
+ "installationConfiguration": "StandAlone",
+ "gridInterconnection": false,
+ "offTaker": "Residential",
+ "sector": "",
+ "commissioningDate": "2021-01-06",
+ "yieldValue": 1500,
+ "standardCompliance": "I-REC",
+ "integrator": "null",
+ "status": "Active"
+ }
]
diff --git a/integrators-scripts/integrator-devices/Candi-devices-sample.json b/integrators-scripts/integrator-devices/Candi-devices-sample.json
index ec76cafe2..07b9b34aa 100755
--- a/integrators-scripts/integrator-devices/Candi-devices-sample.json
+++ b/integrators-scripts/integrator-devices/Candi-devices-sample.json
@@ -1,46 +1,44 @@
[
- {
- "externalId": "null",
- "projectName": "null",
- "latitude": -26.246213,
- "longitude": 28.100683,
- "countryCode": "ZA",
- "capacity": 319000,
- "address": "null",
- "zipCode": "null",
- "fuelCode": "null",
- "deviceTypeCode": "TC120",
- "installationConfiguration": "null",
- "gridInterconnection": true,
- "offTaker": "null",
- "sector": "null",
- "commissioningDate": "2021-01-08",
- "integrator": "null",
- "status": "Active",
- "yieldValue": 1500,
- "standardCompliance": "null"
- },
- {
- "externalId": "null",
- "projectName": "null",
- "latitude": 16.611857,
- "longitude": 74.374541,
- "countryCode": "null",
- "capacity": 349000,
- "address": "null",
- "zipCode": "null",
- "fuelCode": "ES100",
- "deviceTypeCode": "TC120",
- "installationConfiguration": "StandAlone",
- "gridInterconnection": true,
- "offTaker": "null",
- "sector": "null",
- "commissioningDate": "2019-12-24",
- "integrator": "null",
- "status": "Active",
- "yieldValue": 1500,
- "standardCompliance": "null"
- }
-
-
+ {
+ "externalId": "null",
+ "projectName": "null",
+ "latitude": -26.246213,
+ "longitude": 28.100683,
+ "countryCode": "ZA",
+ "capacity": 319000,
+ "address": "null",
+ "zipCode": "null",
+ "fuelCode": "null",
+ "deviceTypeCode": "TC120",
+ "installationConfiguration": "null",
+ "gridInterconnection": true,
+ "offTaker": "null",
+ "sector": "null",
+ "commissioningDate": "2021-01-08",
+ "integrator": "null",
+ "status": "Active",
+ "yieldValue": 1500,
+ "standardCompliance": "null"
+ },
+ {
+ "externalId": "null",
+ "projectName": "null",
+ "latitude": 16.611857,
+ "longitude": 74.374541,
+ "countryCode": "null",
+ "capacity": 349000,
+ "address": "null",
+ "zipCode": "null",
+ "fuelCode": "ES100",
+ "deviceTypeCode": "TC120",
+ "installationConfiguration": "StandAlone",
+ "gridInterconnection": true,
+ "offTaker": "null",
+ "sector": "null",
+ "commissioningDate": "2019-12-24",
+ "integrator": "null",
+ "status": "Active",
+ "yieldValue": 1500,
+ "standardCompliance": "null"
+ }
]
diff --git a/integrators-scripts/integrator-devices/Distributed Energy-devices-sample.json b/integrators-scripts/integrator-devices/Distributed Energy-devices-sample.json
index a80de5c36..28f51f773 100755
--- a/integrators-scripts/integrator-devices/Distributed Energy-devices-sample.json
+++ b/integrators-scripts/integrator-devices/Distributed Energy-devices-sample.json
@@ -1,62 +1,62 @@
[
- {
- "externalId": "1",
- "projectName": "null",
- "latitude": 12.026374,
- "longitude": 79.858566,
- "countryCode": "null",
- "capacity": 110000,
- "address": "null",
- "fuelCode": "ES100",
- "deviceTypeCode": "T020001",
- "installationConfiguration": "null",
- "gridInterconnection": false,
- "standardCompliance": "REC",
- "offTaker": "Industrial",
- "sector": "null",
- "yieldValue": 1474,
- "commissioningDate": "2018-09-08",
- "integrator": "null",
- "status": "Active"
- },
- {
- "externalId": "2",
- "projectName": "null",
- "latitude": 11.81,
- "longitude": 79.78,
- "countryCode": "null",
- "capacity": 0,
- "address": "null",
- "fuelCode": "ES100",
- "deviceTypeCode": "TC110",
- "installationConfiguration": "null",
- "gridInterconnection": false,
- "standardCompliance": "null",
- "offTaker": "null",
- "sector": "null",
- "yieldValue": 1551,
- "commissioningDate": "2019-09-17",
- "integrator": "null",
- "status": "Active"
- },
- {
- "externalId": "3",
- "projectName": "null",
- "latitude": 11.81,
- "longitude": 79.878,
- "countryCode": "null",
- "capacity": 0,
- "address": "null",
- "fuelCode": "null",
- "deviceTypeCode": "TC120",
- "installationConfiguration": "StandAlone",
- "gridInterconnection": false,
- "standardCompliance": "null",
- "offTaker": "Commercial",
- "sector": "Manufacturing",
- "yieldValue": 1551,
- "commissioningDate": "2019-09-17",
- "integrator": "Distributed Energy",
- "status": "null"
- }
+ {
+ "externalId": "1",
+ "projectName": "null",
+ "latitude": 12.026374,
+ "longitude": 79.858566,
+ "countryCode": "null",
+ "capacity": 110000,
+ "address": "null",
+ "fuelCode": "ES100",
+ "deviceTypeCode": "T020001",
+ "installationConfiguration": "null",
+ "gridInterconnection": false,
+ "standardCompliance": "REC",
+ "offTaker": "Industrial",
+ "sector": "null",
+ "yieldValue": 1474,
+ "commissioningDate": "2018-09-08",
+ "integrator": "null",
+ "status": "Active"
+ },
+ {
+ "externalId": "2",
+ "projectName": "null",
+ "latitude": 11.81,
+ "longitude": 79.78,
+ "countryCode": "null",
+ "capacity": 0,
+ "address": "null",
+ "fuelCode": "ES100",
+ "deviceTypeCode": "TC110",
+ "installationConfiguration": "null",
+ "gridInterconnection": false,
+ "standardCompliance": "null",
+ "offTaker": "null",
+ "sector": "null",
+ "yieldValue": 1551,
+ "commissioningDate": "2019-09-17",
+ "integrator": "null",
+ "status": "Active"
+ },
+ {
+ "externalId": "3",
+ "projectName": "null",
+ "latitude": 11.81,
+ "longitude": 79.878,
+ "countryCode": "null",
+ "capacity": 0,
+ "address": "null",
+ "fuelCode": "null",
+ "deviceTypeCode": "TC120",
+ "installationConfiguration": "StandAlone",
+ "gridInterconnection": false,
+ "standardCompliance": "null",
+ "offTaker": "Commercial",
+ "sector": "Manufacturing",
+ "yieldValue": 1551,
+ "commissioningDate": "2019-09-17",
+ "integrator": "Distributed Energy",
+ "status": "null"
+ }
]
diff --git a/integrators-scripts/integrator-devices/Engie-devices-sample.json b/integrators-scripts/integrator-devices/Engie-devices-sample.json
index 2f21e045e..8ca96d995 100755
--- a/integrators-scripts/integrator-devices/Engie-devices-sample.json
+++ b/integrators-scripts/integrator-devices/Engie-devices-sample.json
@@ -1,42 +1,42 @@
[
- {
- "externalId": 0,
- "projectName": "null",
- "latitude": 6,
- "longitude": 2,
- "countryCode": "null",
- "capacity": 10,
- "address": "null",
- "fuelCode": "ES100",
- "deviceTypeCode": "TC120",
- "installationConfiguration": "StandAlone",
- "gridInterconnection": false,
- "standardCompliance": "REC",
- "commissioningDate": "2018-12-20",
- "offTaker": "null",
- "sector": "null",
- "yieldValue": 1500,
- "integrator": "null",
- "status": "Active"
- },
- {
- "externalId": 0,
- "projectName": "null",
- "latitude": 57,
- "longitude": 75,
- "countryCode": "null",
- "capacity": 10,
- "address": "null",
- "fuelCode": "ES100",
- "deviceTypeCode": "TC120",
- "installationConfiguration": "null",
- "gridInterconnection": false,
- "standardCompliance": "REC",
- "commissioningDate": "2019-05-08",
- "offTaker": "null",
- "sector": "null",
- "yieldValue": 1500,
- "integrator": "null",
- "status": "Active"
- }
+ {
+ "externalId": 0,
+ "projectName": "null",
+ "latitude": 6,
+ "longitude": 2,
+ "countryCode": "null",
+ "capacity": 10,
+ "address": "null",
+ "fuelCode": "ES100",
+ "deviceTypeCode": "TC120",
+ "installationConfiguration": "StandAlone",
+ "gridInterconnection": false,
+ "standardCompliance": "REC",
+ "commissioningDate": "2018-12-20",
+ "offTaker": "null",
+ "sector": "null",
+ "yieldValue": 1500,
+ "integrator": "null",
+ "status": "Active"
+ },
+ {
+ "externalId": 0,
+ "projectName": "null",
+ "latitude": 57,
+ "longitude": 75,
+ "countryCode": "null",
+ "capacity": 10,
+ "address": "null",
+ "fuelCode": "ES100",
+ "deviceTypeCode": "TC120",
+ "installationConfiguration": "null",
+ "gridInterconnection": false,
+ "standardCompliance": "REC",
+ "commissioningDate": "2019-05-08",
+ "offTaker": "null",
+ "sector": "null",
+ "yieldValue": 1500,
+ "integrator": "null",
+ "status": "Active"
+ }
]
diff --git a/integrators-scripts/integrator-devices/NSR-devices-sample.json b/integrators-scripts/integrator-devices/NSR-devices-sample.json
index 5e1f1df33..df232ac62 100755
--- a/integrators-scripts/integrator-devices/NSR-devices-sample.json
+++ b/integrators-scripts/integrator-devices/NSR-devices-sample.json
@@ -1,59 +1,59 @@
[
- {
- "externalId": "null",
- "projectName": "null",
- "latitude": 15.488333,
- "longitude": -90.388611,
- "countryCode": "null",
- "capacity": 2700,
- "fuelCode": "ES100",
- "deviceTypeCode": "TC140",
- "installationConfiguration": "StandAlone",
- "gridInterconnection": false,
- "standardCompliance": "null",
- "offTaker": "School",
- "sector": "null",
- "commissioningDate": "2021-11-03",
- "integrator": "null",
- "status": "Active",
- "yieldValue": 1500
- },
- {
- "externalId": "null",
- "projectName": "null",
- "latitude": 15.751944,
- "longitude": -90.721389,
- "countryCode": "null",
- "capacity": 2700,
- "fuelCode": "ES100",
- "deviceTypeCode": "TC140",
- "installationConfiguration": "StandAlone",
- "gridInterconnection": false,
- "standardCompliance": "REC",
- "offTaker": "School",
- "sector": "null",
- "commissioningDate": "2021-11-03",
- "integrator": "null",
- "status": "Active",
- "yieldValue": 1500
- },
- {
- "externalId": "null",
- "projectName": "null",
- "latitude": 15.287018,
- "longitude": -90.125866,
- "countryCode": "null",
- "capacity": 2700,
- "fuelCode": "ES100",
- "deviceTypeCode": "TC140",
- "installationConfiguration": "null",
- "gridInterconnection": false,
- "standardCompliance": "REC",
- "offTaker": "School",
- "sector": "null",
- "commissioningDate": "2021-11-12",
- "integrator": "null",
- "status": "Active",
- "yieldValue": 0
- }
+ {
+ "externalId": "null",
+ "projectName": "null",
+ "latitude": 15.488333,
+ "longitude": -90.388611,
+ "countryCode": "null",
+ "capacity": 2700,
+ "fuelCode": "ES100",
+ "deviceTypeCode": "TC140",
+ "installationConfiguration": "StandAlone",
+ "gridInterconnection": false,
+ "standardCompliance": "null",
+ "offTaker": "School",
+ "sector": "null",
+ "commissioningDate": "2021-11-03",
+ "integrator": "null",
+ "status": "Active",
+ "yieldValue": 1500
+ },
+ {
+ "externalId": "null",
+ "projectName": "null",
+ "latitude": 15.751944,
+ "longitude": -90.721389,
+ "countryCode": "null",
+ "capacity": 2700,
+ "fuelCode": "ES100",
+ "deviceTypeCode": "TC140",
+ "installationConfiguration": "StandAlone",
+ "gridInterconnection": false,
+ "standardCompliance": "REC",
+ "offTaker": "School",
+ "sector": "null",
+ "commissioningDate": "2021-11-03",
+ "integrator": "null",
+ "status": "Active",
+ "yieldValue": 1500
+ },
+ {
+ "externalId": "null",
+ "projectName": "null",
+ "latitude": 15.287018,
+ "longitude": -90.125866,
+ "countryCode": "null",
+ "capacity": 2700,
+ "fuelCode": "ES100",
+ "deviceTypeCode": "TC140",
+ "installationConfiguration": "null",
+ "gridInterconnection": false,
+ "standardCompliance": "REC",
+ "offTaker": "School",
+ "sector": "null",
+ "commissioningDate": "2021-11-12",
+ "integrator": "null",
+ "status": "Active",
+ "yieldValue": 0
+ }
]
diff --git a/integrators-scripts/integrator-devices/Okra-devices-sample.json b/integrators-scripts/integrator-devices/Okra-devices-sample.json
index 7241649ba..045c0e74a 100755
--- a/integrators-scripts/integrator-devices/Okra-devices-sample.json
+++ b/integrators-scripts/integrator-devices/Okra-devices-sample.json
@@ -1,59 +1,59 @@
[
- {
- "externalId": "nul",
- "projectName": "null",
- "latitude": 1,
- "longitude": 10,
- "countryCode": "null",
- "capacity": 660,
- "fuelCode": "null",
- "deviceTypeCode": "TC120",
- "installationConfiguration": "StandAlone",
- "commissioningDate": "2021-05-30",
- "gridInterconnection": false,
- "offTaker": "Residential",
- "sector": "Residential",
- "standardCompliance": "I",
- "yieldValue": 1500,
- "integrator": "Okra",
- "status": "Active"
- },
- {
- "externalId": "null",
- "projectName": "null",
- "latitude": 12.360229,
- "longitude": 104,
- "countryCode": "null",
- "capacity": 660,
- "fuelCode": "null",
- "deviceTypeCode": "TC120",
- "installationConfiguration": "StandAlone",
- "commissioningDate": "2021-05-30",
- "gridInterconnection": false,
- "offTaker": "null",
- "sector": "Residential",
- "standardCompliance": "I",
- "yieldValue": 1500,
- "integrator": "Okra",
- "status": "Active"
- },
- {
- "externalId": "null",
- "projectName": "null",
- "latitude": 1,
- "longitude": 96,
- "countryCode": "null",
- "capacity": 0,
- "fuelCode": "null",
- "deviceTypeCode": "TC120",
- "installationConfiguration": "StandAlone",
- "commissioningDate": "2021-05-30",
- "gridInterconnection": false,
- "offTaker": "Residential",
- "sector": "Residential",
- "standardCompliance": "I",
- "yieldValue": 1500,
- "integrator": "Okra",
- "status": "Active"
- }
+ {
+ "externalId": "nul",
+ "projectName": "null",
+ "latitude": 1,
+ "longitude": 10,
+ "countryCode": "null",
+ "capacity": 660,
+ "fuelCode": "null",
+ "deviceTypeCode": "TC120",
+ "installationConfiguration": "StandAlone",
+ "commissioningDate": "2021-05-30",
+ "gridInterconnection": false,
+ "offTaker": "Residential",
+ "sector": "Residential",
+ "standardCompliance": "I",
+ "yieldValue": 1500,
+ "integrator": "Okra",
+ "status": "Active"
+ },
+ {
+ "externalId": "null",
+ "projectName": "null",
+ "latitude": 12.360229,
+ "longitude": 104,
+ "countryCode": "null",
+ "capacity": 660,
+ "fuelCode": "null",
+ "deviceTypeCode": "TC120",
+ "installationConfiguration": "StandAlone",
+ "commissioningDate": "2021-05-30",
+ "gridInterconnection": false,
+ "offTaker": "null",
+ "sector": "Residential",
+ "standardCompliance": "I",
+ "yieldValue": 1500,
+ "integrator": "Okra",
+ "status": "Active"
+ },
+ {
+ "externalId": "null",
+ "projectName": "null",
+ "latitude": 1,
+ "longitude": 96,
+ "countryCode": "null",
+ "capacity": 0,
+ "fuelCode": "null",
+ "deviceTypeCode": "TC120",
+ "installationConfiguration": "StandAlone",
+ "commissioningDate": "2021-05-30",
+ "gridInterconnection": false,
+ "offTaker": "Residential",
+ "sector": "Residential",
+ "standardCompliance": "I",
+ "yieldValue": 1500,
+ "integrator": "Okra",
+ "status": "Active"
+ }
]
diff --git a/integrators-scripts/integrator-products/BBOX-products-sample.json b/integrators-scripts/integrator-products/BBOX-products-sample.json
index b1644d750..e4e497dbe 100755
--- a/integrators-scripts/integrator-products/BBOX-products-sample.json
+++ b/integrators-scripts/integrator-products/BBOX-products-sample.json
@@ -1,98 +1,98 @@
[
- {
- "externalId": "null",
- "projectName": "null",
- "latitude": "8",
- "longitude": "1",
- "countryCode": "null",
- "fuelCode": "ES100",
- "deviceTypeCode": "TC120",
- "installationConfiguration": "null",
- "capacity": 20,
- "commissioningDate": "2021-03-07",
- "gridInterconnection": false,
- "offTaker": "null",
- "sector": "null",
- "standardCompliance": "I",
- "yieldValue": 1500,
- "labels": "Solar Home",
- "impactStory": "null"
- },
- {
- "externalId": "null",
- "projectName": "null",
- "latitude": "null",
- "longitude": "1.1961276",
- "countryCode": "null",
- "fuelCode": "ES100",
- "deviceTypeCode": "TC120",
- "installationConfiguration": "StandAlone",
- "capacity": 20,
- "commissioningDate": "2021-01-06",
- "gridInterconnection": false,
- "offTaker": "Residential",
- "sector": "Residential",
- "standardCompliance": "I",
- "yieldValue": 1500,
- "labels": "null",
- "impactStory": "null"
- },
- {
- "externalId": "null",
- "projectName": "null",
- "latitude": "9",
- "longitude": "1.40",
- "countryCode": "null",
- "fuelCode": "ES100",
- "deviceTypeCode": "TC120",
- "installationConfiguration": "StandAlone",
- "capacity": 20,
- "commissioningDate": "2021-03-07",
- "gridInterconnection": false,
- "offTaker": "Residential",
- "sector": "Residential",
- "standardCompliance": "I",
- "yieldValue": 1500,
- "labels": "null",
- "impactStory": "null"
- },
-
- {
- "externalId": "null",
- "projectName": "null",
- "latitude": "-1.6539468",
- "longitude": "29.2105084",
- "countryCode": "null",
- "fuelCode": "ES100",
- "deviceTypeCode": "TC120",
- "installationConfiguration": "null",
- "capacity": 20,
- "commissioningDate": "2021-01-21",
- "gridInterconnection": false,
- "offTaker": "Residential",
- "sector": "Residential",
- "standardCompliance": "I-REC",
- "yieldValue": 1500,
- "labels": "null",
- "impactStory": "null"
- },
- {
- "externalId": "null",
- "projectName": "null",
- "latitude": "2.530113",
- "longitude": "2.238",
- "countryCode": "null",
- "fuelCode": "null",
- "deviceTypeCode": "TC120",
- "installationConfiguration": "StandAlone",
- "capacity": 0,
- "commissioningDate": "2021-01-21",
- "gridInterconnection": false,
- "offTaker": "Residential",
- "sector": "Residential",
- "standardCompliance": "I",
- "yieldValue": 1500,
- "labels": "null",
- "impactStory": "null"
- }
+ {
+ "externalId": "null",
+ "projectName": "null",
+ "latitude": "8",
+ "longitude": "1",
+ "countryCode": "null",
+ "fuelCode": "ES100",
+ "deviceTypeCode": "TC120",
+ "installationConfiguration": "null",
+ "capacity": 20,
+ "commissioningDate": "2021-03-07",
+ "gridInterconnection": false,
+ "offTaker": "null",
+ "sector": "null",
+ "standardCompliance": "I",
+ "yieldValue": 1500,
+ "labels": "Solar Home",
+ "impactStory": "null"
+ },
+ {
+ "externalId": "null",
+ "projectName": "null",
+ "latitude": "null",
+ "longitude": "1.1961276",
+ "countryCode": "null",
+ "fuelCode": "ES100",
+ "deviceTypeCode": "TC120",
+ "installationConfiguration": "StandAlone",
+ "capacity": 20,
+ "commissioningDate": "2021-01-06",
+ "gridInterconnection": false,
+ "offTaker": "Residential",
+ "sector": "Residential",
+ "standardCompliance": "I",
+ "yieldValue": 1500,
+ "labels": "null",
+ "impactStory": "null"
+ },
+ {
+ "externalId": "null",
+ "projectName": "null",
+ "latitude": "9",
+ "longitude": "1.40",
+ "countryCode": "null",
+ "fuelCode": "ES100",
+ "deviceTypeCode": "TC120",
+ "installationConfiguration": "StandAlone",
+ "capacity": 20,
+ "commissioningDate": "2021-03-07",
+ "gridInterconnection": false,
+ "offTaker": "Residential",
+ "sector": "Residential",
+ "standardCompliance": "I",
+ "yieldValue": 1500,
+ "labels": "null",
+ "impactStory": "null"
+ },
+
+ {
+ "externalId": "null",
+ "projectName": "null",
+ "latitude": "-1.6539468",
+ "longitude": "29.2105084",
+ "countryCode": "null",
+ "fuelCode": "ES100",
+ "deviceTypeCode": "TC120",
+ "installationConfiguration": "null",
+ "capacity": 20,
+ "commissioningDate": "2021-01-21",
+ "gridInterconnection": false,
+ "offTaker": "Residential",
+ "sector": "Residential",
+ "standardCompliance": "I-REC",
+ "yieldValue": 1500,
+ "labels": "null",
+ "impactStory": "null"
+ },
+ {
+ "externalId": "null",
+ "projectName": "null",
+ "latitude": "2.530113",
+ "longitude": "2.238",
+ "countryCode": "null",
+ "fuelCode": "null",
+ "deviceTypeCode": "TC120",
+ "installationConfiguration": "StandAlone",
+ "capacity": 0,
+ "commissioningDate": "2021-01-21",
+ "gridInterconnection": false,
+ "offTaker": "Residential",
+ "sector": "Residential",
+ "standardCompliance": "I",
+ "yieldValue": 1500,
+ "labels": "null",
+ "impactStory": "null"
+ }
]
diff --git a/integrators-scripts/integrator-products/Candi-products-sample.json b/integrators-scripts/integrator-products/Candi-products-sample.json
index e5943d961..dcc9b557e 100755
--- a/integrators-scripts/integrator-products/Candi-products-sample.json
+++ b/integrators-scripts/integrator-products/Candi-products-sample.json
@@ -1,50 +1,50 @@
[
- {
- "externalId": "null",
- "projectName": "null",
- "address": "null",
- "latitude": "-26.246213",
- "longitude": "28.100683",
- "countryCode": "ZA",
- "zipCode": 2197,
- "fuelCode": "ES100",
- "deviceTypeCode": "null",
- "installationConfiguration": "StandAlone",
- "capacity": 319,
- "commissioningDate": "2021-01-08",
- "gridInterconnection": true,
- "offTaker": "null",
- "sector": "null",
- "standardCompliance": "string",
- "yieldValue": 0,
- "generatorsIds": ["string"],
- "labels": "string",
- "impactStory": "string",
- "data": "string",
- "images": ["string"]
- },
- {
- "externalId": "null",
- "projectName": "null",
- "address": "null",
- "latitude": "16.857",
- "longitude": "74.31",
- "countryCode": "null",
- "zipCode": 676,
- "fuelCode": "ES100",
- "deviceTypeCode": "TC120",
- "installationConfiguration": "StandAlone",
- "capacity": 349,
- "commissioningDate": "2019-12-24",
- "gridInterconnection": true,
- "offTaker": "Industrial",
- "sector": "null",
- "standardCompliance": "string",
- "yieldValue": 0,
- "generatorsIds": ["string"],
- "labels": "string",
- "impactStory": "string",
- "data": "string",
- "images": ["string"]
- }
+ {
+ "externalId": "null",
+ "projectName": "null",
+ "address": "null",
+ "latitude": "-26.246213",
+ "longitude": "28.100683",
+ "countryCode": "ZA",
+ "zipCode": 2197,
+ "fuelCode": "ES100",
+ "deviceTypeCode": "null",
+ "installationConfiguration": "StandAlone",
+ "capacity": 319,
+ "commissioningDate": "2021-01-08",
+ "gridInterconnection": true,
+ "offTaker": "null",
+ "sector": "null",
+ "standardCompliance": "string",
+ "yieldValue": 0,
+ "generatorsIds": ["string"],
+ "labels": "string",
+ "impactStory": "string",
+ "data": "string",
+ "images": ["string"]
+ },
+ {
+ "externalId": "null",
+ "projectName": "null",
+ "address": "null",
+ "latitude": "16.857",
+ "longitude": "74.31",
+ "countryCode": "null",
+ "zipCode": 676,
+ "fuelCode": "ES100",
+ "deviceTypeCode": "TC120",
+ "installationConfiguration": "StandAlone",
+ "capacity": 349,
+ "commissioningDate": "2019-12-24",
+ "gridInterconnection": true,
+ "offTaker": "Industrial",
+ "sector": "null",
+ "standardCompliance": "string",
+ "yieldValue": 0,
+ "generatorsIds": ["string"],
+ "labels": "string",
+ "impactStory": "string",
+ "data": "string",
+ "images": ["string"]
+ }
]
diff --git a/integrators-scripts/integrator-products/Distributed-Energy-products-sample.json b/integrators-scripts/integrator-products/Distributed-Energy-products-sample.json
index 8c433e6ed..c1574e231 100755
--- a/integrators-scripts/integrator-products/Distributed-Energy-products-sample.json
+++ b/integrators-scripts/integrator-products/Distributed-Energy-products-sample.json
@@ -1,68 +1,68 @@
[
- {
- "id": 1,
- "externalId": "1",
- "organizationId": 1,
- "projectName": "null",
- "address": "null",
- "latitude": "12.026374",
- "longitude": "79.858566",
- "countryCode": "IN",
- "fuelCode": "ES100",
- "deviceTypeCode": "T020001",
- "installationConfiguration": "StandAlone",
- "capacity": 110,
- "commissioningDate": "2018-09-08",
- "gridInterconnection": false,
- "offTaker": "null",
- "sector": "null",
- "standardCompliance": "null",
- "yieldValue": 1474,
- "labels": "",
- "impactStory": ""
- },
- {
- "id": 2,
- "externalId": "2",
- "organizationId": 1,
- "projectName": "Schakralaya",
- "address": "null",
- "latitude": "11.81",
- "longitude": "79.78",
- "countryCode": "null",
- "fuelCode": "null",
- "deviceTypeCode": "TC110",
- "installationConfiguration": "null",
- "capacity": 50,
- "commissioningDate": "2019-09-17",
- "gridInterconnection": false,
- "offTaker": "null",
- "sector": "null",
- "standardCompliance": "null",
- "yieldValue": 1551,
- "labels": "",
- "impactStory": ""
- },
- {
- "id": 3,
- "externalId": "3",
- "organizationId": 1,
- "projectName": "null",
- "address": "null",
- "latitude": "11.81",
- "longitude": "79.878",
- "countryCode": "null",
- "fuelCode": "ES100",
- "deviceTypeCode": "TC120",
- "installationConfiguration": "StandAlone",
- "capacity": 75,
- "commissioningDate": "2019-09-17",
- "gridInterconnection": false,
- "offTaker": "Commercial",
- "sector": "Manufacturing",
- "standardCompliance": "null",
- "yieldValue": 1551,
- "labels": "",
- "impactStory": ""
- }
+ {
+ "id": 1,
+ "externalId": "1",
+ "organizationId": 1,
+ "projectName": "null",
+ "address": "null",
+ "latitude": "12.026374",
+ "longitude": "79.858566",
+ "countryCode": "IN",
+ "fuelCode": "ES100",
+ "deviceTypeCode": "T020001",
+ "installationConfiguration": "StandAlone",
+ "capacity": 110,
+ "commissioningDate": "2018-09-08",
+ "gridInterconnection": false,
+ "offTaker": "null",
+ "sector": "null",
+ "standardCompliance": "null",
+ "yieldValue": 1474,
+ "labels": "",
+ "impactStory": ""
+ },
+ {
+ "id": 2,
+ "externalId": "2",
+ "organizationId": 1,
+ "projectName": "Schakralaya",
+ "address": "null",
+ "latitude": "11.81",
+ "longitude": "79.78",
+ "countryCode": "null",
+ "fuelCode": "null",
+ "deviceTypeCode": "TC110",
+ "installationConfiguration": "null",
+ "capacity": 50,
+ "commissioningDate": "2019-09-17",
+ "gridInterconnection": false,
+ "offTaker": "null",
+ "sector": "null",
+ "standardCompliance": "null",
+ "yieldValue": 1551,
+ "labels": "",
+ "impactStory": ""
+ },
+ {
+ "id": 3,
+ "externalId": "3",
+ "organizationId": 1,
+ "projectName": "null",
+ "address": "null",
+ "latitude": "11.81",
+ "longitude": "79.878",
+ "countryCode": "null",
+ "fuelCode": "ES100",
+ "deviceTypeCode": "TC120",
+ "installationConfiguration": "StandAlone",
+ "capacity": 75,
+ "commissioningDate": "2019-09-17",
+ "gridInterconnection": false,
+ "offTaker": "Commercial",
+ "sector": "Manufacturing",
+ "standardCompliance": "null",
+ "yieldValue": 1551,
+ "labels": "",
+ "impactStory": ""
+ }
]
diff --git a/integrators-scripts/integrator-products/Engie-products-sample.json b/integrators-scripts/integrator-products/Engie-products-sample.json
index fe0e17b4b..f2caea8b9 100755
--- a/integrators-scripts/integrator-products/Engie-products-sample.json
+++ b/integrators-scripts/integrator-products/Engie-products-sample.json
@@ -1,201 +1,200 @@
[
- {
- "ID": 1,
- "externalID": 12,
- "organizationID": "",
- "projectName": "nul",
- "address": "Dakomey-Yohonoukon, Ganvie 2, Sô-Ava",
- "latitude": 6.46852,
- "longitude": 2.32,
- "countryCode": "BJ",
- "fuelCode": "ES100",
- "deviceTypeCode": "TC120",
- "installationconfiguration": "StandAlone",
- "capacity": 0.01,
- "commissioningdate": "20/12/2018",
- "gridInterconnection": false,
- "offTaker": "null",
- "sector": "residential",
- "standardcompliance": "null",
- "yieldValue": "",
- "labels": "",
- "impactStory": ""
- },
- {
- "ID": 2,
- "externalID": 978,
- "organizationID": "",
- "projectName": "null",
- "address": "null",
- "latitude": 6.70889,
- "longitude": 2.188216,
- "countryCode": "BJ",
- "fuelCode": "ES100",
- "deviceTypeCode": "TC120",
- "installationconfiguration": "StandAlone",
- "capacity": 0.01,
- "commissioningdate": "08/05/2019",
- "gridInterconnection": false,
- "offTaker": "null",
- "sector": "null",
- "standardcompliance": "REC",
- "yieldValue": "",
- "labels": "",
- "impactStory": ""
- },
- {
- "ID": 3,
- "externalID": 675,
- "organizationID": "",
- "projectName": "null",
- "address": "null",
- "latitude": 7.769473,
- "longitude": 2.013268,
- "countryCode": "BJ",
- "fuelCode": "ES100",
- "deviceTypeCode": "null",
- "installationconfiguration": "StandAlone",
- "capacity": 0,
- "commissioningdate": "20/04/2019",
- "gridInterconnection": false,
- "offTaker": "null",
- "sector": "residential",
- "standardcompliance": "null",
- "yieldValue": "",
- "labels": "",
- "impactStory": ""
- },
- {
- "ID": 4,
- "externalID": 32764568577,
- "organizationID": "",
- "projectName": "null",
- "address": "null",
- "latitude": 6.364871,
- "longitude": 2.044554,
- "countryCode": "BJ",
- "fuelCode": "ES100",
- "deviceTypeCode": "TC120",
- "installationconfiguration": "StandAlone",
- "capacity": 0.01,
- "commissioningdate": "29/03/2019",
- "gridInterconnection": false,
- "offTaker": "null",
- "sector": "null",
- "standardcompliance": "null",
- "yieldValue": "",
- "labels": "",
- "impactStory": ""
- },
- {
- "ID": 5,
- "externalID": 3953084,
- "organizationID": "",
- "projectName": "null",
- "address": "null",
- "latitude": 6.629063,
- "longitude": 2.231402,
- "countryCode": "BJ",
- "fuelCode": "null",
- "deviceTypeCode": "TC120",
- "installationconfiguration": "StandAlone",
- "capacity": 0,
- "commissioningdate": "01/06/2019",
- "gridInterconnection": false,
- "offTaker": "null",
- "sector": "residential",
- "standardcompliance": "null",
- "yieldValue": "",
- "labels": "",
- "impactStory": ""
-
- },
- {
- "ID": 6,
- "externalID": 54645,
- "organizationID": "",
- "projectName": "null",
- "address": "null",
- "latitude": 5.3996,
- "longitude": -3.199,
- "countryCode": "null",
- "fuelCode": "ES100",
- "deviceTypeCode": "TC120",
- "installationconfiguration": "null",
- "capacity": 0.02,
- "commissioningdate": "29/02/2020",
- "gridInterconnection": false,
- "offTaker": "residential",
- "sector": "null",
- "standardcompliance": "null",
- "yieldValue": "",
- "labels": "",
- "impactStory": ""
- },
- {
- "ID": 7,
- "externalID": 658,
- "organizationID": "",
- "projectName": "null",
- "address": "null",
- "latitude": 7.46,
- "longitude": -7.17,
- "countryCode": "nullI",
- "fuelCode": "ES100",
- "deviceTypeCode": "TC120",
- "installationconfiguration": "StandAlone",
- "capacity": 0.01,
- "commissioningdate": "10/02/2020",
- "gridInterconnection": false,
- "offTaker": "null",
- "sector": "residential",
- "standardcompliance": "null",
- "yieldValue": "",
- "labels": "",
- "impactStory": ""
- },
- {
- "ID": 8,
- "externalID": 46467,
- "organizationID": "",
- "projectName": "null",
- "address": "null",
- "latitude": 7.8,
- "longitude": -7.89090,
- "countryCode": "null",
- "fuelCode": "ES100",
- "deviceTypeCode": "TC120",
- "installationconfiguration": "StandAlone",
- "capacity": 0.01,
- "commissioningdate": "05/12/2019",
- "gridInterconnection": false,
- "offTaker": "residential",
- "sector": "residential",
- "standardcompliance": "null",
- "yieldValue": "",
- "labels": "",
- "impactStory": ""
- },
- {
- "ID": 9,
- "externalID": 9867,
- "organizationID": "",
- "projectName": "null",
- "address": "null",
- "latitude": 7.063419,
- "longitude": -7.531432,
- "countryCode": "CI",
- "fuelCode": "ES100",
- "deviceTypeCode": "TC120",
- "installationconfiguration": "null",
- "capacity": 0,
- "commissioningdate": "04/12/2019",
- "gridInterconnection": false,
- "offTaker": "residential",
- "sector": "null",
- "standardcompliance": "null",
- "yieldValue": "",
- "labels": "",
- "impactStory": ""
- }
+ {
+ "ID": 1,
+ "externalID": 12,
+ "organizationID": "",
+ "projectName": "nul",
+ "address": "Dakomey-Yohonoukon, Ganvie 2, Sô-Ava",
+ "latitude": 6.46852,
+ "longitude": 2.32,
+ "countryCode": "BJ",
+ "fuelCode": "ES100",
+ "deviceTypeCode": "TC120",
+ "installationconfiguration": "StandAlone",
+ "capacity": 0.01,
+ "commissioningdate": "20/12/2018",
+ "gridInterconnection": false,
+ "offTaker": "null",
+ "sector": "residential",
+ "standardcompliance": "null",
+ "yieldValue": "",
+ "labels": "",
+ "impactStory": ""
+ },
+ {
+ "ID": 2,
+ "externalID": 978,
+ "organizationID": "",
+ "projectName": "null",
+ "address": "null",
+ "latitude": 6.70889,
+ "longitude": 2.188216,
+ "countryCode": "BJ",
+ "fuelCode": "ES100",
+ "deviceTypeCode": "TC120",
+ "installationconfiguration": "StandAlone",
+ "capacity": 0.01,
+ "commissioningdate": "08/05/2019",
+ "gridInterconnection": false,
+ "offTaker": "null",
+ "sector": "null",
+ "standardcompliance": "REC",
+ "yieldValue": "",
+ "labels": "",
+ "impactStory": ""
+ },
+ {
+ "ID": 3,
+ "externalID": 675,
+ "organizationID": "",
+ "projectName": "null",
+ "address": "null",
+ "latitude": 7.769473,
+ "longitude": 2.013268,
+ "countryCode": "BJ",
+ "fuelCode": "ES100",
+ "deviceTypeCode": "null",
+ "installationconfiguration": "StandAlone",
+ "capacity": 0,
+ "commissioningdate": "20/04/2019",
+ "gridInterconnection": false,
+ "offTaker": "null",
+ "sector": "residential",
+ "standardcompliance": "null",
+ "yieldValue": "",
+ "labels": "",
+ "impactStory": ""
+ },
+ {
+ "ID": 4,
+ "externalID": 32764568577,
+ "organizationID": "",
+ "projectName": "null",
+ "address": "null",
+ "latitude": 6.364871,
+ "longitude": 2.044554,
+ "countryCode": "BJ",
+ "fuelCode": "ES100",
+ "deviceTypeCode": "TC120",
+ "installationconfiguration": "StandAlone",
+ "capacity": 0.01,
+ "commissioningdate": "29/03/2019",
+ "gridInterconnection": false,
+ "offTaker": "null",
+ "sector": "null",
+ "standardcompliance": "null",
+ "yieldValue": "",
+ "labels": "",
+ "impactStory": ""
+ },
+ {
+ "ID": 5,
+ "externalID": 3953084,
+ "organizationID": "",
+ "projectName": "null",
+ "address": "null",
+ "latitude": 6.629063,
+ "longitude": 2.231402,
+ "countryCode": "BJ",
+ "fuelCode": "null",
+ "deviceTypeCode": "TC120",
+ "installationconfiguration": "StandAlone",
+ "capacity": 0,
+ "commissioningdate": "01/06/2019",
+ "gridInterconnection": false,
+ "offTaker": "null",
+ "sector": "residential",
+ "standardcompliance": "null",
+ "yieldValue": "",
+ "labels": "",
+ "impactStory": ""
+ },
+ {
+ "ID": 6,
+ "externalID": 54645,
+ "organizationID": "",
+ "projectName": "null",
+ "address": "null",
+ "latitude": 5.3996,
+ "longitude": -3.199,
+ "countryCode": "null",
+ "fuelCode": "ES100",
+ "deviceTypeCode": "TC120",
+ "installationconfiguration": "null",
+ "capacity": 0.02,
+ "commissioningdate": "29/02/2020",
+ "gridInterconnection": false,
+ "offTaker": "residential",
+ "sector": "null",
+ "standardcompliance": "null",
+ "yieldValue": "",
+ "labels": "",
+ "impactStory": ""
+ },
+ {
+ "ID": 7,
+ "externalID": 658,
+ "organizationID": "",
+ "projectName": "null",
+ "address": "null",
+ "latitude": 7.46,
+ "longitude": -7.17,
+ "countryCode": "nullI",
+ "fuelCode": "ES100",
+ "deviceTypeCode": "TC120",
+ "installationconfiguration": "StandAlone",
+ "capacity": 0.01,
+ "commissioningdate": "10/02/2020",
+ "gridInterconnection": false,
+ "offTaker": "null",
+ "sector": "residential",
+ "standardcompliance": "null",
+ "yieldValue": "",
+ "labels": "",
+ "impactStory": ""
+ },
+ {
+ "ID": 8,
+ "externalID": 46467,
+ "organizationID": "",
+ "projectName": "null",
+ "address": "null",
+ "latitude": 7.8,
+ "longitude": -7.8909,
+ "countryCode": "null",
+ "fuelCode": "ES100",
+ "deviceTypeCode": "TC120",
+ "installationconfiguration": "StandAlone",
+ "capacity": 0.01,
+ "commissioningdate": "05/12/2019",
+ "gridInterconnection": false,
+ "offTaker": "residential",
+ "sector": "residential",
+ "standardcompliance": "null",
+ "yieldValue": "",
+ "labels": "",
+ "impactStory": ""
+ },
+ {
+ "ID": 9,
+ "externalID": 9867,
+ "organizationID": "",
+ "projectName": "null",
+ "address": "null",
+ "latitude": 7.063419,
+ "longitude": -7.531432,
+ "countryCode": "CI",
+ "fuelCode": "ES100",
+ "deviceTypeCode": "TC120",
+ "installationconfiguration": "null",
+ "capacity": 0,
+ "commissioningdate": "04/12/2019",
+ "gridInterconnection": false,
+ "offTaker": "residential",
+ "sector": "null",
+ "standardcompliance": "null",
+ "yieldValue": "",
+ "labels": "",
+ "impactStory": ""
+ }
]
diff --git a/integrators-scripts/integrator-products/NSR-products-sample.json b/integrators-scripts/integrator-products/NSR-products-sample.json
index 8129b77b1..f1096ef97 100755
--- a/integrators-scripts/integrator-products/NSR-products-sample.json
+++ b/integrators-scripts/integrator-products/NSR-products-sample.json
@@ -1,59 +1,59 @@
[
- {
- "externalId": "null",
- "projectName": "null",
- "latitude": 15.88333,
- "longitude": -90.3811,
- "countryCode": "GT",
- "capacity": 2.7,
- "fuelCode": "ES100",
- "deviceTypeCode": "TC140",
- "installationconfiguration": "StandAlone",
- "commissioningdate": "2021-11-03",
- "gridInterconnection": false,
- "offTaker": "School",
- "sector": "null",
- "standardcompliance": "null",
- "yieldValue": "0",
- "labels": "",
- "impactStory": ""
- },
- {
- "externalId": "null",
- "projectName": "null",
- "latitude": 15.751944,
- "longitude": -90.721389,
- "countryCode": "GT",
- "fuelCode": "ES100",
- "deviceTypeCode": "TC140",
- "installationconfiguration": "StandAlone",
- "capacity": 2.7,
- "commissioningdate": "2021-11-03",
- "gridInterconnection": false,
- "offTaker": "School",
- "sector": "null",
- "standardcompliance": "null",
- "yieldValue": "0",
- "labels": "",
- "impactStory": ""
- },
- {
- "externalId": "null",
- "projectName": "null",
- "latitude": 15.87018,
- "longitude": -90.866,
- "countryCode": "GT",
- "fuelCode": "ES100",
- "deviceTypeCode": "TC140",
- "installationconfiguration": "null",
- "capacity": 2.7,
- "commissioningdate": "2021-11-12",
- "gridInterconnection": false,
- "offTaker": "null",
- "sector": "null",
- "standardcompliance": "null",
- "yieldValue": "1500",
- "labels": "",
- "impactStory": ""
- }
+ {
+ "externalId": "null",
+ "projectName": "null",
+ "latitude": 15.88333,
+ "longitude": -90.3811,
+ "countryCode": "GT",
+ "capacity": 2.7,
+ "fuelCode": "ES100",
+ "deviceTypeCode": "TC140",
+ "installationconfiguration": "StandAlone",
+ "commissioningdate": "2021-11-03",
+ "gridInterconnection": false,
+ "offTaker": "School",
+ "sector": "null",
+ "standardcompliance": "null",
+ "yieldValue": "0",
+ "labels": "",
+ "impactStory": ""
+ },
+ {
+ "externalId": "null",
+ "projectName": "null",
+ "latitude": 15.751944,
+ "longitude": -90.721389,
+ "countryCode": "GT",
+ "fuelCode": "ES100",
+ "deviceTypeCode": "TC140",
+ "installationconfiguration": "StandAlone",
+ "capacity": 2.7,
+ "commissioningdate": "2021-11-03",
+ "gridInterconnection": false,
+ "offTaker": "School",
+ "sector": "null",
+ "standardcompliance": "null",
+ "yieldValue": "0",
+ "labels": "",
+ "impactStory": ""
+ },
+ {
+ "externalId": "null",
+ "projectName": "null",
+ "latitude": 15.87018,
+ "longitude": -90.866,
+ "countryCode": "GT",
+ "fuelCode": "ES100",
+ "deviceTypeCode": "TC140",
+ "installationconfiguration": "null",
+ "capacity": 2.7,
+ "commissioningdate": "2021-11-12",
+ "gridInterconnection": false,
+ "offTaker": "null",
+ "sector": "null",
+ "standardcompliance": "null",
+ "yieldValue": "1500",
+ "labels": "",
+ "impactStory": ""
+ }
]
diff --git a/integrators-scripts/integrator-products/Okra-products-sample.json b/integrators-scripts/integrator-products/Okra-products-sample.json
index 72298903d..60b66108d 100755
--- a/integrators-scripts/integrator-products/Okra-products-sample.json
+++ b/integrators-scripts/integrator-products/Okra-products-sample.json
@@ -1,86 +1,86 @@
[
- {
- "externalId": "null",
- "latitude": 12.5,
- "longitude": 12,
- "countryCode": "null",
- "capacity": 660
- },
- {
- "externalId": "null",
- "latitude": 12.360229,
- "longitude": 104.605608,
- "countryCode": "null",
- "capacity": 660
- },
- {
- "externalId": "null",
- "latitude": 12.36008587,
- "longitude": 104.60587196,
- "countryCode": "null",
- "capacity": 0
- },
- {
- "externalId": "null",
- "latitude": 12.35991523,
- "longitude": 1747,
- "countryCode": "null",
- "capacity": 0
- },
- {
- "externalId": "EHeHEZa",
- "latitude": 12.35982452,
- "longitude": 104.60659482,
- "countryCode": "KH",
- "capacity": 300
- },
- {
- "externalId": "pLrr3Ys",
- "latitude": 12.35967255,
- "longitude": 104.60667361,
- "countryCode": "KH",
- "capacity": 456
- },
- {
- "externalId": "ve-GoD5",
- "latitude": 12.359851,
- "longitude": 104.606484,
- "countryCode": "KH",
- "capacity": 0
- },
- {
- "externalId": "BJRxXOR",
- "latitude": 12.360275,
- "longitude": 104.605371,
- "countryCode": "KH",
- "capacity": 660
- },
- {
- "externalId": "null",
- "latitude": 12.360359,
- "longitude": 104.605307,
- "countryCode": "null",
- "capacity": 660
- },
- {
- "externalId": "null",
- "latitude": 12.360397,
- "longitude": 104.605219,
- "countryCode": "KH",
- "capacity": 660
- },
- {
- "externalId": "null",
- "latitude": 12.36784893,
- "longitude": 104.62269176,
- "countryCode": "KH",
- "capacity": 300
- },
- {
- "externalId": "null",
- "latitude": 12.3547,
- "longitude": 14.6875,
- "countryCode": "null",
- "capacity": 300
- }
+ {
+ "externalId": "null",
+ "latitude": 12.5,
+ "longitude": 12,
+ "countryCode": "null",
+ "capacity": 660
+ },
+ {
+ "externalId": "null",
+ "latitude": 12.360229,
+ "longitude": 104.605608,
+ "countryCode": "null",
+ "capacity": 660
+ },
+ {
+ "externalId": "null",
+ "latitude": 12.36008587,
+ "longitude": 104.60587196,
+ "countryCode": "null",
+ "capacity": 0
+ },
+ {
+ "externalId": "null",
+ "latitude": 12.35991523,
+ "longitude": 1747,
+ "countryCode": "null",
+ "capacity": 0
+ },
+ {
+ "externalId": "EHeHEZa",
+ "latitude": 12.35982452,
+ "longitude": 104.60659482,
+ "countryCode": "KH",
+ "capacity": 300
+ },
+ {
+ "externalId": "pLrr3Ys",
+ "latitude": 12.35967255,
+ "longitude": 104.60667361,
+ "countryCode": "KH",
+ "capacity": 456
+ },
+ {
+ "externalId": "ve-GoD5",
+ "latitude": 12.359851,
+ "longitude": 104.606484,
+ "countryCode": "KH",
+ "capacity": 0
+ },
+ {
+ "externalId": "BJRxXOR",
+ "latitude": 12.360275,
+ "longitude": 104.605371,
+ "countryCode": "KH",
+ "capacity": 660
+ },
+ {
+ "externalId": "null",
+ "latitude": 12.360359,
+ "longitude": 104.605307,
+ "countryCode": "null",
+ "capacity": 660
+ },
+ {
+ "externalId": "null",
+ "latitude": 12.360397,
+ "longitude": 104.605219,
+ "countryCode": "KH",
+ "capacity": 660
+ },
+ {
+ "externalId": "null",
+ "latitude": 12.36784893,
+ "longitude": 104.62269176,
+ "countryCode": "KH",
+ "capacity": 300
+ },
+ {
+ "externalId": "null",
+ "latitude": 12.3547,
+ "longitude": 14.6875,
+ "countryCode": "null",
+ "capacity": 300
+ }
]
diff --git a/integrators-scripts/integrators.js b/integrators-scripts/integrators.js
index 375edb381..903099196 100755
--- a/integrators-scripts/integrators.js
+++ b/integrators-scripts/integrators.js
@@ -1,16 +1,16 @@
'use strict';
const Integrator = {
- BBOX: 'BBOX',
- Odyssey: 'Odyssey',
- OKRA: 'Okra',
- ENGIE: 'Engie',
- CANDI: 'Candi',
- NSR: 'NSR',
- DISTRIBUTED_ENERGY: 'Distributed Energy'
+ BBOX: 'BBOX',
+ Odyssey: 'Odyssey',
+ OKRA: 'Okra',
+ ENGIE: 'Engie',
+ CANDI: 'Candi',
+ NSR: 'NSR',
+ DISTRIBUTED_ENERGY: 'Distributed Energy',
};
Object.freeze(Integrator);
module.exports = {
- Integrator
+ Integrator,
};
diff --git a/integrators-scripts/package.json b/integrators-scripts/package.json
index 1e66a33e2..f81aefa0c 100755
--- a/integrators-scripts/package.json
+++ b/integrators-scripts/package.json
@@ -1,20 +1,20 @@
{
- "name": "@energyweb/drec-integrators-scripts",
- "version": "0.0.1",
- "description": "",
- "main": "index.js",
- "scripts": {
- "start": "node index.js",
- "test": "echo \"Error: no test specified\" && exit 1"
- },
- "author": "EnergyWeb DevHub GmbH; Florin Georgescu, florin.georgescu@energyweb.org",
- "license": "GPL-3.0-or-later",
- "dependencies": {
- "axios": "^0.28.0",
- "csv-parser": "^3.0.0",
- "dotenv": "^10.0.0",
- "form-data": "^4.0.0",
- "luxon": "^2.5.2",
- "minimist": "^1.2.6"
- }
+ "name": "@energyweb/drec-integrators-scripts",
+ "version": "0.0.1",
+ "description": "",
+ "main": "index.js",
+ "scripts": {
+ "start": "node index.js",
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "author": "EnergyWeb DevHub GmbH; Florin Georgescu, florin.georgescu@energyweb.org",
+ "license": "GPL-3.0-or-later",
+ "dependencies": {
+ "axios": "^0.28.0",
+ "csv-parser": "^3.0.0",
+ "dotenv": "^10.0.0",
+ "form-data": "^4.0.0",
+ "luxon": "^2.5.2",
+ "minimist": "^1.2.6"
+ }
}
diff --git a/integrators-scripts/post-devices.js b/integrators-scripts/post-devices.js
index 62e300c33..37f31561a 100755
--- a/integrators-scripts/post-devices.js
+++ b/integrators-scripts/post-devices.js
@@ -7,71 +7,87 @@ const server = process.env.DREC_BACKEND_URL;
const auth = require('./auth');
const integrators = require('./integrators');
-const okraDevices = require(`./integrator-devices/${integrators.Integrator.OKRA}-devices.json`);
-const engieDevices = require(`./integrator-devices/${integrators.Integrator.ENGIE}-devices.json`);
-const distributedEnergyDevices = require(`./integrator-devices/${integrators.Integrator.DISTRIBUTED_ENERGY}-devices.json`);
-const nsrDevices = require(`./integrator-devices/${integrators.Integrator.NSR}-devices.json`);
-const candiDevices = require(`./integrator-devices/${integrators.Integrator.CANDI}-devices.json`);
-const bboxxDevices = require(`./integrator-devices/${integrators.Integrator.BBOX}-devices.json`);
+const okraDevices = require(
+ `./integrator-devices/${integrators.Integrator.OKRA}-devices.json`,
+);
+const engieDevices = require(
+ `./integrator-devices/${integrators.Integrator.ENGIE}-devices.json`,
+);
+const distributedEnergyDevices = require(
+ `./integrator-devices/${integrators.Integrator.DISTRIBUTED_ENERGY}-devices.json`,
+);
+const nsrDevices = require(
+ `./integrator-devices/${integrators.Integrator.NSR}-devices.json`,
+);
+const candiDevices = require(
+ `./integrator-devices/${integrators.Integrator.CANDI}-devices.json`,
+);
+const bboxxDevices = require(
+ `./integrator-devices/${integrators.Integrator.BBOX}-devices.json`,
+);
const postDevices = async (devices, token) => {
- const config = {
- headers: { Authorization: `Bearer ${token}` }
- };
- try {
- const res = await axios.post(`${server}/device-group/bulk-devices`, devices, config);
- console.log('Device Group uploaded with result: ', res.data);
- } catch (err) {
- console.error('Error: ', err.response.data);
- }
+ const config = {
+ headers: { Authorization: `Bearer ${token}` },
+ };
+ try {
+ const res = await axios.post(
+ `${server}/device-group/bulk-devices`,
+ devices,
+ config,
+ );
+ console.log('Device Group uploaded with result: ', res.data);
+ } catch (err) {
+ console.error('Error: ', err.response.data);
+ }
};
const postOkraDevices = async () => {
- const apiToken = await auth.loginOkra();
- return await postDevices(okraDevices, apiToken);
+ const apiToken = await auth.loginOkra();
+ return await postDevices(okraDevices, apiToken);
};
const postNSRDevices = async () => {
- const apiToken = await auth.loginNSR();
- return await postDevices(nsrDevices, apiToken);
+ const apiToken = await auth.loginNSR();
+ return await postDevices(nsrDevices, apiToken);
};
const postEngieDevices = async () => {
- const apiToken = await auth.loginEngie();
- const limit = 200;
- const chunks = Math.round(engieDevices.length / 200);
- // The list is way too long, so we need to split them into batches (Max allowed is 200 devices per batch)
- for (let i = 0; i < chunks; i++) {
- let start = limit * i + (i == 0 ? i : 1);
- let end = limit * (i + 1);
- const devices = engieDevices.slice(start, end);
- const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
- await sleep(2000);
- await postDevices(devices, apiToken);
- }
- return;
+ const apiToken = await auth.loginEngie();
+ const limit = 200;
+ const chunks = Math.round(engieDevices.length / 200);
+ // The list is way too long, so we need to split them into batches (Max allowed is 200 devices per batch)
+ for (let i = 0; i < chunks; i++) {
+ let start = limit * i + (i == 0 ? i : 1);
+ let end = limit * (i + 1);
+ const devices = engieDevices.slice(start, end);
+ const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
+ await sleep(2000);
+ await postDevices(devices, apiToken);
+ }
+ return;
};
const postBBOXDevices = async () => {
- const apiToken = await auth.loginBBOX();
- return await postDevices(bboxxDevices, apiToken);
+ const apiToken = await auth.loginBBOX();
+ return await postDevices(bboxxDevices, apiToken);
};
const postDistributedEnergyDevices = async () => {
- const apiToken = await auth.loginDistributedEnergy();
- return await postDevices(distributedEnergyDevices, apiToken);
+ const apiToken = await auth.loginDistributedEnergy();
+ return await postDevices(distributedEnergyDevices, apiToken);
};
const postCandiDevices = async () => {
- const apiToken = await auth.loginCandi();
- return await postDevices(candiDevices, apiToken);
+ const apiToken = await auth.loginCandi();
+ return await postDevices(candiDevices, apiToken);
};
module.exports = {
- postOkraDevices,
- postNSRDevices,
- postEngieDevices,
- postDistributedEnergyDevices,
- postCandiDevices,
- postBBOXDevices
+ postOkraDevices,
+ postNSRDevices,
+ postEngieDevices,
+ postDistributedEnergyDevices,
+ postCandiDevices,
+ postBBOXDevices,
};
diff --git a/integrators-scripts/post-reads.js b/integrators-scripts/post-reads.js
index eb361a395..1cdb7effa 100755
--- a/integrators-scripts/post-reads.js
+++ b/integrators-scripts/post-reads.js
@@ -9,94 +9,98 @@ const fs = require('fs');
const auth = require('./auth');
const postMeterReads = async (externalId, meterReads, token) => {
- const config = {
- headers: { Authorization: `Bearer ${token}` }
- };
- try {
- const res = await axios.post(`${server}/meter-reads/${externalId}`, meterReads, config);
- console.log('Meter reads uploaded: ', res.data);
- } catch (err) {
- console.error('Error while uploading meter reads: ', err.response.data);
- }
+ const config = {
+ headers: { Authorization: `Bearer ${token}` },
+ };
+ try {
+ const res = await axios.post(
+ `${server}/meter-reads/${externalId}`,
+ meterReads,
+ config,
+ );
+ console.log('Meter reads uploaded: ', res.data);
+ } catch (err) {
+ console.error('Error while uploading meter reads: ', err.response.data);
+ }
};
const readMeterDataAndStore = (apiToken, csvFilePath) => {
- const results = [];
- fs.createReadStream(csvFilePath)
- .pipe(csv())
- .on('data', (data) => results.push(data))
- .on('end', () => {
- const productsIds = Array.from(new Set(results.map((read) => read.id)));
- Promise.all(
- productsIds.map(async (id) => {
- const reads = [];
- results.map((readResult) => {
- if (readResult.id === id && readResult.value) {
- reads.push({
- timestamp: readResult.timestamp,
- value: Number(readResult.value)
- });
- }
- });
- const meterReads = {
- reads,
- unit: 'Wh'
- };
- console.log('Saving reads...', id, meterReads);
- // Save it to D-REC DB
- await postMeterReads(id, meterReads, apiToken);
- })
- );
- });
+ const results = [];
+ fs.createReadStream(csvFilePath)
+ .pipe(csv())
+ .on('data', (data) => results.push(data))
+ .on('end', () => {
+ const productsIds = Array.from(new Set(results.map((read) => read.id)));
+ Promise.all(
+ productsIds.map(async (id) => {
+ const reads = [];
+ results.map((readResult) => {
+ if (readResult.id === id && readResult.value) {
+ reads.push({
+ timestamp: readResult.timestamp,
+ value: Number(readResult.value),
+ });
+ }
+ });
+ const meterReads = {
+ reads,
+ unit: 'Wh',
+ };
+ console.log('Saving reads...', id, meterReads);
+ // Save it to D-REC DB
+ await postMeterReads(id, meterReads, apiToken);
+ }),
+ );
+ });
};
const postOkraReads = async () => {
- const apiToken = await auth.loginOkra();
- readMeterDataAndStore(apiToken, './integrator-csv/okra.csv');
+ const apiToken = await auth.loginOkra();
+ readMeterDataAndStore(apiToken, './integrator-csv/okra.csv');
};
const postOkraReadsDAILY = async () => {
- const apiToken = await auth.loginOkra();
- readMeterDataAndStore(apiToken, './integrator-daily-csv/okra.csv');
+ const apiToken = await auth.loginOkra();
+ readMeterDataAndStore(apiToken, './integrator-daily-csv/okra.csv');
};
const postNSRReads = async () => {
- const apiToken = await auth.loginNSR();
- readMeterDataAndStore(apiToken, './integrator-csv/nsr.csv');
+ const apiToken = await auth.loginNSR();
+ readMeterDataAndStore(apiToken, './integrator-csv/nsr.csv');
};
const postNSRReadsDAILY = async () => {
- const apiToken = await auth.loginNSR();
- readMeterDataAndStore(apiToken, './integrator-daily-csv/nsr.csv');
+ const apiToken = await auth.loginNSR();
+ readMeterDataAndStore(apiToken, './integrator-daily-csv/nsr.csv');
};
const postEngieReads = async () => {
- const apiToken = await auth.loginEngie();
- readMeterDataAndStore(apiToken, './integrator-csv/engie.csv');
+ const apiToken = await auth.loginEngie();
+ readMeterDataAndStore(apiToken, './integrator-csv/engie.csv');
};
const postDistributedEnergyReads = async () => {
- const apiToken = await auth.loginDistributedEnergy();
- readMeterDataAndStore(apiToken, './integrator-csv/distributed-energy.csv');
+ const apiToken = await auth.loginDistributedEnergy();
+ readMeterDataAndStore(apiToken, './integrator-csv/distributed-energy.csv');
};
const postCandiReads = async () => {
- const apiToken = await auth.loginCandi();
- readMeterDataAndStore(apiToken, './integrator-csv/candi.csv');
+ const apiToken = await auth.loginCandi();
+ readMeterDataAndStore(apiToken, './integrator-csv/candi.csv');
};
const postCandiReadsDAILY = async () => {
- const apiToken = await auth.loginCandi();
- readMeterDataAndStore(apiToken, './integrator-daily-csv/candi.csv');
+ const apiToken = await auth.loginCandi();
+ readMeterDataAndStore(apiToken, './integrator-daily-csv/candi.csv');
};
module.exports = {
- postOkraReads,
- postOkraReadsDAILY,
- postNSRReads,
- postNSRReadsDAILY,
- postEngieReads,
- postDistributedEnergyReads,
- postCandiReads,
- postCandiReadsDAILY
+ postOkraReads,
+ postOkraReadsDAILY,
+ postNSRReads,
+ postNSRReadsDAILY,
+ postEngieReads,
+ postDistributedEnergyReads,
+ postCandiReads,
+ postCandiReadsDAILY,
};
diff --git a/rush.json b/rush.json
index 5b62e1394..5fe3b1d2d 100755
--- a/rush.json
+++ b/rush.json
@@ -3,434 +3,434 @@
* For full documentation, please see https://rushjs.io
*/
{
- "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json",
+ "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json",
+ /**
+ * (Required) This specifies the version of the Rush engine to be used in this repo.
+ * Rush's "version selector" feature ensures that the globally installed tool will
+ * behave like this release, regardless of which version is installed globally.
+ *
+ * The common/scripts/install-run-rush.js automation script also uses this version.
+ *
+ * NOTE: If you upgrade to a new major version of Rush, you should replace the "v5"
+ * path segment in the "$schema" field for all your Rush config files. This will ensure
+ * correct error-underlining and tab-completion for editors such as VS Code.
+ */
+ "rushVersion": "5.120.0",
+ /**
+ * The next field selects which package manager should be installed and determines its version.
+ * Rush installs its own local copy of the package manager to ensure that your build process
+ * is fully isolated from whatever tools are present in the local environment.
+ *
+ * Specify one of: "pnpmVersion", "npmVersion", or "yarnVersion". See the Rush documentation
+ * for details about these alternatives.
+ */
+ "pnpmVersion": "7.30.5",
+ // "npmVersion": "4.5.0",
+ // "yarnVersion": "1.9.4",
+ /**
+ * Options that are only used when the PNPM package manager is selected
+ */
+ "pnpmOptions": {
/**
- * (Required) This specifies the version of the Rush engine to be used in this repo.
- * Rush's "version selector" feature ensures that the globally installed tool will
- * behave like this release, regardless of which version is installed globally.
+ * Specifies the location of the PNPM store. There are two possible values:
*
- * The common/scripts/install-run-rush.js automation script also uses this version.
+ * - "local" - use the "pnpm-store" folder in the current configured temp folder:
+ * "common/temp/pnpm-store" by default.
+ * - "global" - use PNPM's global store, which has the benefit of being shared
+ * across multiple repo folders, but the disadvantage of less isolation for builds
+ * (e.g. bugs or incompatibilities when two repos use different releases of PNPM)
*
- * NOTE: If you upgrade to a new major version of Rush, you should replace the "v5"
- * path segment in the "$schema" field for all your Rush config files. This will ensure
- * correct error-underlining and tab-completion for editors such as VS Code.
- */
- "rushVersion": "5.120.0",
- /**
- * The next field selects which package manager should be installed and determines its version.
- * Rush installs its own local copy of the package manager to ensure that your build process
- * is fully isolated from whatever tools are present in the local environment.
+ * RUSH_PNPM_STORE_PATH will override the directory that will be used as the store
*
- * Specify one of: "pnpmVersion", "npmVersion", or "yarnVersion". See the Rush documentation
- * for details about these alternatives.
+ * In all cases, the store path will be overridden by the environment variable RUSH_PNPM_STORE_PATH.
+ *
+ * The default value is "local".
*/
- "pnpmVersion": "7.30.5",
- // "npmVersion": "4.5.0",
- // "yarnVersion": "1.9.4",
+ // "pnpmStore": "local",
/**
- * Options that are only used when the PNPM package manager is selected
+ * If true, then Rush will add the "--strict-peer-dependencies" option when invoking PNPM.
+ * This causes "rush install" to fail if there are unsatisfied peer dependencies, which is
+ * an invalid state that can cause build failures or incompatible dependency versions.
+ * (For historical reasons, JavaScript package managers generally do not treat this invalid
+ * state as an error.)
+ *
+ * The default value is false to avoid legacy compatibility issues.
+ * It is strongly recommended to set strictPeerDependencies=true.
*/
- "pnpmOptions": {
- /**
- * Specifies the location of the PNPM store. There are two possible values:
- *
- * - "local" - use the "pnpm-store" folder in the current configured temp folder:
- * "common/temp/pnpm-store" by default.
- * - "global" - use PNPM's global store, which has the benefit of being shared
- * across multiple repo folders, but the disadvantage of less isolation for builds
- * (e.g. bugs or incompatibilities when two repos use different releases of PNPM)
- *
- * RUSH_PNPM_STORE_PATH will override the directory that will be used as the store
- *
- * In all cases, the store path will be overridden by the environment variable RUSH_PNPM_STORE_PATH.
- *
- * The default value is "local".
- */
- // "pnpmStore": "local",
- /**
- * If true, then Rush will add the "--strict-peer-dependencies" option when invoking PNPM.
- * This causes "rush install" to fail if there are unsatisfied peer dependencies, which is
- * an invalid state that can cause build failures or incompatible dependency versions.
- * (For historical reasons, JavaScript package managers generally do not treat this invalid
- * state as an error.)
- *
- * The default value is false to avoid legacy compatibility issues.
- * It is strongly recommended to set strictPeerDependencies=true.
- */
- // "strictPeerDependencies": true,
- /**
- * Configures the strategy used to select versions during installation.
- *
- * This feature requires PNPM version 3.1 or newer. It corresponds to the "--resolution-strategy" command-line
- * option for PNPM. Possible values are "fast" and "fewer-dependencies". PNPM's default is "fast", but this may
- * be incompatible with certain packages, for example the "@types" packages from DefinitelyTyped. Rush's default
- * is "fewer-dependencies", which causes PNPM to avoid installing a newer version if an already installed version
- * can be reused; this is more similar to NPM's algorithm.
- *
- * After modifying this field, it's recommended to run "rush update --full" so that the package manager
- * will recalculate all version selections.
- */
- // "resolutionStrategy": "fast",
- /**
- * If true, then `rush install` will report an error if manual modifications
- * were made to the PNPM shrinkwrap file without running "rush update" afterwards.
- *
- * This feature protects against accidental inconsistencies that may be introduced
- * if the PNPM shrinkwrap file ("pnpm-lock.yaml") is manually edited. When this
- * feature is enabled, "rush update" will append a hash to the file as a YAML comment,
- * and then "rush update" and "rush install" will validate the hash. Note that this does not prohibit
- * manual modifications, but merely requires "rush update" be run
- * afterwards, ensuring that PNPM can report or repair any potential inconsistencies.
- *
- * To temporarily disable this validation when invoking "rush install", use the
- * "--bypass-policy" command-line parameter.
- *
- * The default value is false.
- */
- // "preventManualShrinkwrapChanges": true,
- /**
- * If true, then `rush install` will use the PNPM workspaces feature to perform the
- * install.
- *
- * This feature uses PNPM to perform the entire monorepo install. When using workspaces, Rush will
- * generate a "pnpm-workspace.yaml" file referencing all local projects to install. Rush will
- * also generate a "pnpmfile.js" which is used to provide preferred versions support. When install
- * is run, this pnpmfile will be used to replace dependency version ranges with a smaller subset
- * of the original range. If the preferred version is not fully a subset of the original version
- * range, it will be left as-is. After this, the pnpmfile.js provided in the repository (if one
- * exists) will be called to further modify package dependencies.
- *
- * This option is experimental. The default value is false.
- */
- // "useWorkspaces": true
- },
+ // "strictPeerDependencies": true,
/**
- * Older releases of the Node.js engine may be missing features required by your system.
- * Other releases may have bugs. In particular, the "latest" version will not be a
- * Long Term Support (LTS) version and is likely to have regressions.
+ * Configures the strategy used to select versions during installation.
*
- * Specify a SemVer range to ensure developers use a Node.js version that is appropriate
- * for your repo.
+ * This feature requires PNPM version 3.1 or newer. It corresponds to the "--resolution-strategy" command-line
+ * option for PNPM. Possible values are "fast" and "fewer-dependencies". PNPM's default is "fast", but this may
+ * be incompatible with certain packages, for example the "@types" packages from DefinitelyTyped. Rush's default
+ * is "fewer-dependencies", which causes PNPM to avoid installing a newer version if an already installed version
+ * can be reused; this is more similar to NPM's algorithm.
*
- * LTS schedule: https://nodejs.org/en/about/releases/
- * LTS versions: https://nodejs.org/en/download/releases/
+ * After modifying this field, it's recommended to run "rush update --full" so that the package manager
+ * will recalculate all version selections.
*/
- "nodeSupportedVersionRange": ">=12.13.0 <13.0.0 || >=14.15.0 <17.0.0",
+ // "resolutionStrategy": "fast",
/**
- * Odd-numbered major versions of Node.js are experimental. Even-numbered releases
- * spend six months in a stabilization period before the first Long Term Support (LTS) version.
- * For example, 8.9.0 was the first LTS version of Node.js 8. Pre-LTS versions are not recommended
- * for production usage because they frequently have bugs. They may cause Rush itself
- * to malfunction.
+ * If true, then `rush install` will report an error if manual modifications
+ * were made to the PNPM shrinkwrap file without running "rush update" afterwards.
*
- * Rush normally prints a warning if it detects a pre-LTS Node.js version. If you are testing
- * pre-LTS versions in preparation for supporting the first LTS version, you can use this setting
- * to disable Rush's warning.
+ * This feature protects against accidental inconsistencies that may be introduced
+ * if the PNPM shrinkwrap file ("pnpm-lock.yaml") is manually edited. When this
+ * feature is enabled, "rush update" will append a hash to the file as a YAML comment,
+ * and then "rush update" and "rush install" will validate the hash. Note that this does not prohibit
+ * manual modifications, but merely requires "rush update" be run
+ * afterwards, ensuring that PNPM can report or repair any potential inconsistencies.
+ *
+ * To temporarily disable this validation when invoking "rush install", use the
+ * "--bypass-policy" command-line parameter.
+ *
+ * The default value is false.
*/
- // "suppressNodeLtsWarning": false,
+ // "preventManualShrinkwrapChanges": true,
/**
- * If you would like the version specifiers for your dependencies to be consistent, then
- * uncomment this line. This is effectively similar to running "rush check" before any
- * of the following commands:
+ * If true, then `rush install` will use the PNPM workspaces feature to perform the
+ * install.
*
- * rush install, rush update, rush link, rush version, rush publish
+ * This feature uses PNPM to perform the entire monorepo install. When using workspaces, Rush will
+ * generate a "pnpm-workspace.yaml" file referencing all local projects to install. Rush will
+ * also generate a "pnpmfile.js" which is used to provide preferred versions support. When install
+ * is run, this pnpmfile will be used to replace dependency version ranges with a smaller subset
+ * of the original range. If the preferred version is not fully a subset of the original version
+ * range, it will be left as-is. After this, the pnpmfile.js provided in the repository (if one
+ * exists) will be called to further modify package dependencies.
*
- * In some cases you may want this turned on, but need to allow certain packages to use a different
- * version. In those cases, you will need to add an entry to the "allowedAlternativeVersions"
- * section of the common-versions.json.
+ * This option is experimental. The default value is false.
*/
- // "ensureConsistentVersions": true,
+ // "useWorkspaces": true
+ },
+ /**
+ * Older releases of the Node.js engine may be missing features required by your system.
+ * Other releases may have bugs. In particular, the "latest" version will not be a
+ * Long Term Support (LTS) version and is likely to have regressions.
+ *
+ * Specify a SemVer range to ensure developers use a Node.js version that is appropriate
+ * for your repo.
+ *
+ * LTS schedule: https://nodejs.org/en/about/releases/
+ * LTS versions: https://nodejs.org/en/download/releases/
+ */
+ "nodeSupportedVersionRange": ">=12.13.0 <13.0.0 || >=14.15.0 <17.0.0",
+ /**
+ * Odd-numbered major versions of Node.js are experimental. Even-numbered releases
+ * spend six months in a stabilization period before the first Long Term Support (LTS) version.
+ * For example, 8.9.0 was the first LTS version of Node.js 8. Pre-LTS versions are not recommended
+ * for production usage because they frequently have bugs. They may cause Rush itself
+ * to malfunction.
+ *
+ * Rush normally prints a warning if it detects a pre-LTS Node.js version. If you are testing
+ * pre-LTS versions in preparation for supporting the first LTS version, you can use this setting
+ * to disable Rush's warning.
+ */
+ // "suppressNodeLtsWarning": false,
+ /**
+ * If you would like the version specifiers for your dependencies to be consistent, then
+ * uncomment this line. This is effectively similar to running "rush check" before any
+ * of the following commands:
+ *
+ * rush install, rush update, rush link, rush version, rush publish
+ *
+ * In some cases you may want this turned on, but need to allow certain packages to use a different
+ * version. In those cases, you will need to add an entry to the "allowedAlternativeVersions"
+ * section of the common-versions.json.
+ */
+ // "ensureConsistentVersions": true,
+ /**
+ * Large monorepos can become intimidating for newcomers if project folder paths don't follow
+ * a consistent and recognizable pattern. When the system allows nested folder trees,
+ * we've found that teams will often use subfolders to create islands that isolate
+ * their work from others ("shipping the org"). This hinders collaboration and code sharing.
+ *
+ * The Rush developers recommend a "category folder" model, where buildable project folders
+ * must always be exactly two levels below the repo root. The parent folder acts as the category.
+ * This provides a basic facility for grouping related projects (e.g. "apps", "libraries",
+ * "tools", "prototypes") while still encouraging teams to organize their projects into
+ * a unified taxonomy. Limiting to 2 levels seems very restrictive at first, but if you have
+ * 20 categories and 20 projects in each category, this scheme can easily accommodate hundreds
+ * of projects. In practice, you will find that the folder hierarchy needs to be rebalanced
+ * occasionally, but if that's painful, it's a warning sign that your development style may
+ * discourage refactoring. Reorganizing the categories should be an enlightening discussion
+ * that brings people together, and maybe also identifies poor coding practices (e.g. file
+ * references that reach into other project's folders without using Node.js module resolution).
+ *
+ * The defaults are projectFolderMinDepth=1 and projectFolderMaxDepth=2.
+ *
+ * To remove these restrictions, you could set projectFolderMinDepth=1
+ * and set projectFolderMaxDepth to a large number.
+ */
+ // "projectFolderMinDepth": 2,
+ // "projectFolderMaxDepth": 2,
+ /**
+ * Today the npmjs.com registry enforces fairly strict naming rules for packages, but in the early
+ * days there was no standard and hardly any enforcement. A few large legacy projects are still using
+ * nonstandard package names, and private registries sometimes allow it. Set "allowMostlyStandardPackageNames"
+ * to true to relax Rush's enforcement of package names. This allows upper case letters and in the future may
+ * relax other rules, however we want to minimize these exceptions. Many popular tools use certain punctuation
+ * characters as delimiters, based on the assumption that they will never appear in a package name; thus if we relax
+ * the rules too much it is likely to cause very confusing malfunctions.
+ *
+ * The default value is false.
+ */
+ // "allowMostlyStandardPackageNames": true,
+ /**
+ * This feature helps you to review and approve new packages before they are introduced
+ * to your monorepo. For example, you may be concerned about licensing, code quality,
+ * performance, or simply accumulating too many libraries with overlapping functionality.
+ * The approvals are tracked in two config files "browser-approved-packages.json"
+ * and "nonbrowser-approved-packages.json". See the Rush documentation for details.
+ */
+ // "approvedPackagesPolicy": {
+ // /**
+ // * The review categories allow you to say for example "This library is approved for usage
+ // * in prototypes, but not in production code."
+ // *
+ // * Each project can be associated with one review category, by assigning the "reviewCategory" field
+ // * in the "projects" section of rush.json. The approval is then recorded in the files
+ // * "common/config/rush/browser-approved-packages.json" and "nonbrowser-approved-packages.json"
+ // * which are automatically generated during "rush update".
+ // *
+ // * Designate categories with whatever granularity is appropriate for your review process,
+ // * or you could just have a single category called "default".
+ // */
+ // "reviewCategories": [
+ // // Some example categories:
+ // "production", // projects that ship to production
+ // "tools", // non-shipping projects that are part of the developer toolchain
+ // "prototypes" // experiments that should mostly be ignored by the review process
+ // ],
+ //
+ // /**
+ // * A list of NPM package scopes that will be excluded from review.
+ // * We recommend to exclude TypeScript typings (the "@types" scope), because
+ // * if the underlying package was already approved, this would imply that the typings
+ // * are also approved.
+ // */
+ // // "ignoredNpmScopes": ["@types"]
+ // },
+ /**
+ * If you use Git as your version control system, this section has some additional
+ * optional features you can use.
+ */
+ "gitPolicy": {
/**
- * Large monorepos can become intimidating for newcomers if project folder paths don't follow
- * a consistent and recognizable pattern. When the system allows nested folder trees,
- * we've found that teams will often use subfolders to create islands that isolate
- * their work from others ("shipping the org"). This hinders collaboration and code sharing.
+ * Work at a big company? Tired of finding Git commits at work with unprofessional Git
+ * emails such as "beer-lover@my-college.edu"? Rush can validate people's Git email address
+ * before they get started.
*
- * The Rush developers recommend a "category folder" model, where buildable project folders
- * must always be exactly two levels below the repo root. The parent folder acts as the category.
- * This provides a basic facility for grouping related projects (e.g. "apps", "libraries",
- * "tools", "prototypes") while still encouraging teams to organize their projects into
- * a unified taxonomy. Limiting to 2 levels seems very restrictive at first, but if you have
- * 20 categories and 20 projects in each category, this scheme can easily accommodate hundreds
- * of projects. In practice, you will find that the folder hierarchy needs to be rebalanced
- * occasionally, but if that's painful, it's a warning sign that your development style may
- * discourage refactoring. Reorganizing the categories should be an enlightening discussion
- * that brings people together, and maybe also identifies poor coding practices (e.g. file
- * references that reach into other project's folders without using Node.js module resolution).
+ * Define a list of regular expressions describing allowable e-mail patterns for Git commits.
+ * They are case-insensitive anchored JavaScript RegExps. Example: ".*@example\.com"
*
- * The defaults are projectFolderMinDepth=1 and projectFolderMaxDepth=2.
+ * IMPORTANT: Because these are regular expressions encoded as JSON string literals,
+ * RegExp escapes need two backslashes, and ordinary periods should be "\\.".
+ */
+ // "allowedEmailRegExps": [
+ // "[^@]+@users\\.noreply\\.github\\.com",
+ // "travis@example\\.org"
+ // ],
+ /**
+ * When Rush reports that the address is malformed, the notice can include an example
+ * of a recommended email. Make sure it conforms to one of the allowedEmailRegExps
+ * expressions.
+ */
+ // "sampleEmail": "mrexample@users.noreply.github.com",
+ /**
+ * The commit message to use when committing changes during 'rush publish'.
*
- * To remove these restrictions, you could set projectFolderMinDepth=1
- * and set projectFolderMaxDepth to a large number.
+ * For example, if you want to prevent these commits from triggering a CI build,
+ * you might configure your system's trigger to look for a special string such as "[skip-ci]"
+ * in the commit message, and then customize Rush's message to contain that string.
*/
- // "projectFolderMinDepth": 2,
- // "projectFolderMaxDepth": 2,
+ // "versionBumpCommitMessage": "Applying package updates. [skip-ci]",
/**
- * Today the npmjs.com registry enforces fairly strict naming rules for packages, but in the early
- * days there was no standard and hardly any enforcement. A few large legacy projects are still using
- * nonstandard package names, and private registries sometimes allow it. Set "allowMostlyStandardPackageNames"
- * to true to relax Rush's enforcement of package names. This allows upper case letters and in the future may
- * relax other rules, however we want to minimize these exceptions. Many popular tools use certain punctuation
- * characters as delimiters, based on the assumption that they will never appear in a package name; thus if we relax
- * the rules too much it is likely to cause very confusing malfunctions.
+ * The commit message to use when committing changes during 'rush version'.
*
- * The default value is false.
+ * For example, if you want to prevent these commits from triggering a CI build,
+ * you might configure your system's trigger to look for a special string such as "[skip-ci]"
+ * in the commit message, and then customize Rush's message to contain that string.
*/
- // "allowMostlyStandardPackageNames": true,
+ // "changeLogUpdateCommitMessage": "Deleting change files and updating change logs for package updates. [skip-ci]"
+ },
+ "repository": {
/**
- * This feature helps you to review and approve new packages before they are introduced
- * to your monorepo. For example, you may be concerned about licensing, code quality,
- * performance, or simply accumulating too many libraries with overlapping functionality.
- * The approvals are tracked in two config files "browser-approved-packages.json"
- * and "nonbrowser-approved-packages.json". See the Rush documentation for details.
+ * The URL of this Git repository, used by "rush change" to determine the base branch for your PR.
+ *
+ * The "rush change" command needs to determine which files are affected by your PR diff.
+ * If you merged or cherry-picked commits from the master branch into your PR branch, those commits
+ * should be excluded from this diff (since they belong to some other PR). In order to do that,
+ * Rush needs to know where to find the base branch for your PR. This information cannot be
+ * determined from Git alone, since the "pull request" feature is not a Git concept. Ideally
+ * Rush would use a vendor-specific protocol to query the information from GitHub, Azure DevOps, etc.
+ * But to keep things simple, "rush change" simply assumes that your PR is against the "master" branch
+ * of the Git remote indicated by the repository.url setting in rush.json. If you are working in
+ * a GitHub "fork" of the real repo, this setting will be different from the repository URL of your
+ * your PR branch, and in this situation "rush change" will also automatically invoke "git fetch"
+ * to retrieve the latest activity for the remote master branch.
*/
- // "approvedPackagesPolicy": {
- // /**
- // * The review categories allow you to say for example "This library is approved for usage
- // * in prototypes, but not in production code."
- // *
- // * Each project can be associated with one review category, by assigning the "reviewCategory" field
- // * in the "projects" section of rush.json. The approval is then recorded in the files
- // * "common/config/rush/browser-approved-packages.json" and "nonbrowser-approved-packages.json"
- // * which are automatically generated during "rush update".
- // *
- // * Designate categories with whatever granularity is appropriate for your review process,
- // * or you could just have a single category called "default".
- // */
- // "reviewCategories": [
- // // Some example categories:
- // "production", // projects that ship to production
- // "tools", // non-shipping projects that are part of the developer toolchain
- // "prototypes" // experiments that should mostly be ignored by the review process
- // ],
- //
- // /**
- // * A list of NPM package scopes that will be excluded from review.
- // * We recommend to exclude TypeScript typings (the "@types" scope), because
- // * if the underlying package was already approved, this would imply that the typings
- // * are also approved.
- // */
- // // "ignoredNpmScopes": ["@types"]
- // },
+ // "url": "https://github.com/microsoft/rush-example",
/**
- * If you use Git as your version control system, this section has some additional
- * optional features you can use.
+ * The default branch name. This tells "rush change" which remote branch to compare against.
+ * The default value is "master"
*/
- "gitPolicy": {
- /**
- * Work at a big company? Tired of finding Git commits at work with unprofessional Git
- * emails such as "beer-lover@my-college.edu"? Rush can validate people's Git email address
- * before they get started.
- *
- * Define a list of regular expressions describing allowable e-mail patterns for Git commits.
- * They are case-insensitive anchored JavaScript RegExps. Example: ".*@example\.com"
- *
- * IMPORTANT: Because these are regular expressions encoded as JSON string literals,
- * RegExp escapes need two backslashes, and ordinary periods should be "\\.".
- */
- // "allowedEmailRegExps": [
- // "[^@]+@users\\.noreply\\.github\\.com",
- // "travis@example\\.org"
- // ],
- /**
- * When Rush reports that the address is malformed, the notice can include an example
- * of a recommended email. Make sure it conforms to one of the allowedEmailRegExps
- * expressions.
- */
- // "sampleEmail": "mrexample@users.noreply.github.com",
- /**
- * The commit message to use when committing changes during 'rush publish'.
- *
- * For example, if you want to prevent these commits from triggering a CI build,
- * you might configure your system's trigger to look for a special string such as "[skip-ci]"
- * in the commit message, and then customize Rush's message to contain that string.
- */
- // "versionBumpCommitMessage": "Applying package updates. [skip-ci]",
- /**
- * The commit message to use when committing changes during 'rush version'.
- *
- * For example, if you want to prevent these commits from triggering a CI build,
- * you might configure your system's trigger to look for a special string such as "[skip-ci]"
- * in the commit message, and then customize Rush's message to contain that string.
- */
- // "changeLogUpdateCommitMessage": "Deleting change files and updating change logs for package updates. [skip-ci]"
- },
- "repository": {
- /**
- * The URL of this Git repository, used by "rush change" to determine the base branch for your PR.
- *
- * The "rush change" command needs to determine which files are affected by your PR diff.
- * If you merged or cherry-picked commits from the master branch into your PR branch, those commits
- * should be excluded from this diff (since they belong to some other PR). In order to do that,
- * Rush needs to know where to find the base branch for your PR. This information cannot be
- * determined from Git alone, since the "pull request" feature is not a Git concept. Ideally
- * Rush would use a vendor-specific protocol to query the information from GitHub, Azure DevOps, etc.
- * But to keep things simple, "rush change" simply assumes that your PR is against the "master" branch
- * of the Git remote indicated by the repository.url setting in rush.json. If you are working in
- * a GitHub "fork" of the real repo, this setting will be different from the repository URL of your
- * your PR branch, and in this situation "rush change" will also automatically invoke "git fetch"
- * to retrieve the latest activity for the remote master branch.
- */
- // "url": "https://github.com/microsoft/rush-example",
- /**
- * The default branch name. This tells "rush change" which remote branch to compare against.
- * The default value is "master"
- */
- // "defaultBranch": "master",
- /**
- * The default remote. This tells "rush change" which remote to compare against if the remote URL is
- * not set or if a remote matching the provided remote URL is not found.
- */
- // "defaultRemote": "origin"
- },
+ // "defaultBranch": "master",
/**
- * Event hooks are customized script actions that Rush executes when specific events occur
+ * The default remote. This tells "rush change" which remote to compare against if the remote URL is
+ * not set or if a remote matching the provided remote URL is not found.
*/
- "eventHooks": {
- /**
- * The list of shell commands to run before the Rush installation starts
- */
- "preRushInstall": [
- // "common/scripts/pre-rush-install.js"
- ],
- /**
- * The list of shell commands to run after the Rush installation finishes
- */
- "postRushInstall": [],
- /**
- * The list of shell commands to run before the Rush build command starts
- */
- "preRushBuild": [],
- /**
- * The list of shell commands to run after the Rush build command finishes
- */
- "postRushBuild": []
- },
+ // "defaultRemote": "origin"
+ },
+ /**
+ * Event hooks are customized script actions that Rush executes when specific events occur
+ */
+ "eventHooks": {
/**
- * Installation variants allow you to maintain a parallel set of configuration files that can be
- * used to build the entire monorepo with an alternate set of dependencies. For example, suppose
- * you upgrade all your projects to use a new release of an important framework, but during a transition period
- * you intend to maintain compatibility with the old release. In this situation, you probably want your
- * CI validation to build the entire repo twice: once with the old release, and once with the new release.
- *
- * Rush "installation variants" correspond to sets of config files located under this folder:
- *
- * common/config/rush/variants/
- *
- * The variant folder can contain an alternate common-versions.json file. Its "preferredVersions" field can be used
- * to select older versions of dependencies (within a loose SemVer range specified in your package.json files).
- * To install a variant, run "rush install --variant ".
- *
- * For more details and instructions, see this article: https://rushjs.io/pages/advanced/installation_variants/
+ * The list of shell commands to run before the Rush installation starts
*/
- "variants": [
- // {
- // /**
- // * The folder name for this variant.
- // */
- // "variantName": "old-sdk",
- //
- // /**
- // * An informative description
- // */
- // "description": "Build this repo using the previous release of the SDK"
- // }
+ "preRushInstall": [
+ // "common/scripts/pre-rush-install.js"
],
/**
- * Rush can collect anonymous telemetry about everyday developer activity such as
- * success/failure of installs, builds, and other operations. You can use this to identify
- * problems with your toolchain or Rush itself. THIS TELEMETRY IS NOT SHARED WITH MICROSOFT.
- * It is written into JSON files in the common/temp folder. It's up to you to write scripts
- * that read these JSON files and do something with them. These scripts are typically registered
- * in the "eventHooks" section.
+ * The list of shell commands to run after the Rush installation finishes
*/
- // "telemetryEnabled": false,
+ "postRushInstall": [],
/**
- * Allows creation of hotfix changes. This feature is experimental so it is disabled by default.
- * If this is set, 'rush change' only allows a 'hotfix' change type to be specified. This change type
- * will be used when publishing subsequent changes from the monorepo.
+ * The list of shell commands to run before the Rush build command starts
*/
- // "hotfixChangeEnabled": false,
+ "preRushBuild": [],
/**
- * (Required) This is the inventory of projects to be managed by Rush.
- *
- * Rush does not automatically scan for projects using wildcards, for a few reasons:
- * 1. Depth-first scans are expensive, particularly when tools need to repeatedly collect the list.
- * 2. On a caching CI machine, scans can accidentally pick up files left behind from a previous build.
- * 3. It's useful to have a centralized inventory of all projects and their important metadata.
+ * The list of shell commands to run after the Rush build command finishes
*/
- "projects": [
- {
- "packageName": "@energyweb/origin-drec-api",
- "projectFolder": "apps/drec-api"
- }
- // {
- // /**
- // * The NPM package name of the project (must match package.json)
- // */
- // "packageName": "my-app",
- //
- // /**
- // * The path to the project folder, relative to the rush.json config file.
- // */
- // "projectFolder": "apps/my-app",
- //
- // /**
- // * An optional category for usage in the "browser-approved-packages.json"
- // * and "nonbrowser-approved-packages.json" files. The value must be one of the
- // * strings from the "reviewCategories" defined above.
- // */
- // "reviewCategory": "production",
- //
- // /**
- // * A list of local projects that appear as devDependencies for this project, but cannot be
- // * locally linked because it would create a cyclic dependency; instead, the last published
- // * version will be installed in the Common folder.
- // */
- // "cyclicDependencyProjects": [
- // // "my-toolchain"
- // ],
- //
- // /**
- // * If true, then this project will be ignored by the "rush check" command.
- // * The default value is false.
- // */
- // // "skipRushCheck": false,
- //
- // /**
- // * A flag indicating that changes to this project will be published to npm, which affects
- // * the Rush change and publish workflows. The default value is false.
- // * NOTE: "versionPolicyName" and "shouldPublish" are alternatives; you cannot specify them both.
- // */
- // // "shouldPublish": false,
- //
- // /**
- // * Facilitates postprocessing of a project's files prior to publishing.
- // *
- // * If specified, the "publishFolder" is the relative path to a subfolder of the project folder.
- // * The "rush publish" command will publish the subfolder instead of the project folder. The subfolder
- // * must contain its own package.json file, which is typically a build output.
- // */
- // // "publishFolder": "temp/publish",
- //
- // /**
- // * An optional version policy associated with the project. Version policies are defined
- // * in "version-policies.json" file. See the "rush publish" documentation for more info.
- // * NOTE: "versionPolicyName" and "shouldPublish" are alternatives; you cannot specify them both.
- // */
- // // "versionPolicyName": ""
- // },
- //
- // {
- // "packageName": "my-controls",
- // "projectFolder": "libraries/my-controls",
- // "reviewCategory": "production"
- // },
- //
- // {
- // "packageName": "my-toolchain",
- // "projectFolder": "tools/my-toolchain",
- // "reviewCategory": "tools"
- // }
- ]
+ "postRushBuild": []
+ },
+ /**
+ * Installation variants allow you to maintain a parallel set of configuration files that can be
+ * used to build the entire monorepo with an alternate set of dependencies. For example, suppose
+ * you upgrade all your projects to use a new release of an important framework, but during a transition period
+ * you intend to maintain compatibility with the old release. In this situation, you probably want your
+ * CI validation to build the entire repo twice: once with the old release, and once with the new release.
+ *
+ * Rush "installation variants" correspond to sets of config files located under this folder:
+ *
+ * common/config/rush/variants/
+ *
+ * The variant folder can contain an alternate common-versions.json file. Its "preferredVersions" field can be used
+ * to select older versions of dependencies (within a loose SemVer range specified in your package.json files).
+ * To install a variant, run "rush install --variant ".
+ *
+ * For more details and instructions, see this article: https://rushjs.io/pages/advanced/installation_variants/
+ */
+ "variants": [
+ // {
+ // /**
+ // * The folder name for this variant.
+ // */
+ // "variantName": "old-sdk",
+ //
+ // /**
+ // * An informative description
+ // */
+ // "description": "Build this repo using the previous release of the SDK"
+ // }
+ ],
+ /**
+ * Rush can collect anonymous telemetry about everyday developer activity such as
+ * success/failure of installs, builds, and other operations. You can use this to identify
+ * problems with your toolchain or Rush itself. THIS TELEMETRY IS NOT SHARED WITH MICROSOFT.
+ * It is written into JSON files in the common/temp folder. It's up to you to write scripts
+ * that read these JSON files and do something with them. These scripts are typically registered
+ * in the "eventHooks" section.
+ */
+ // "telemetryEnabled": false,
+ /**
+ * Allows creation of hotfix changes. This feature is experimental so it is disabled by default.
+ * If this is set, 'rush change' only allows a 'hotfix' change type to be specified. This change type
+ * will be used when publishing subsequent changes from the monorepo.
+ */
+ // "hotfixChangeEnabled": false,
+ /**
+ * (Required) This is the inventory of projects to be managed by Rush.
+ *
+ * Rush does not automatically scan for projects using wildcards, for a few reasons:
+ * 1. Depth-first scans are expensive, particularly when tools need to repeatedly collect the list.
+ * 2. On a caching CI machine, scans can accidentally pick up files left behind from a previous build.
+ * 3. It's useful to have a centralized inventory of all projects and their important metadata.
+ */
+ "projects": [
+ {
+ "packageName": "@energyweb/origin-drec-api",
+ "projectFolder": "apps/drec-api"
+ }
+ // {
+ // /**
+ // * The NPM package name of the project (must match package.json)
+ // */
+ // "packageName": "my-app",
+ //
+ // /**
+ // * The path to the project folder, relative to the rush.json config file.
+ // */
+ // "projectFolder": "apps/my-app",
+ //
+ // /**
+ // * An optional category for usage in the "browser-approved-packages.json"
+ // * and "nonbrowser-approved-packages.json" files. The value must be one of the
+ // * strings from the "reviewCategories" defined above.
+ // */
+ // "reviewCategory": "production",
+ //
+ // /**
+ // * A list of local projects that appear as devDependencies for this project, but cannot be
+ // * locally linked because it would create a cyclic dependency; instead, the last published
+ // * version will be installed in the Common folder.
+ // */
+ // "cyclicDependencyProjects": [
+ // // "my-toolchain"
+ // ],
+ //
+ // /**
+ // * If true, then this project will be ignored by the "rush check" command.
+ // * The default value is false.
+ // */
+ // // "skipRushCheck": false,
+ //
+ // /**
+ // * A flag indicating that changes to this project will be published to npm, which affects
+ // * the Rush change and publish workflows. The default value is false.
+ // * NOTE: "versionPolicyName" and "shouldPublish" are alternatives; you cannot specify them both.
+ // */
+ // // "shouldPublish": false,
+ //
+ // /**
+ // * Facilitates postprocessing of a project's files prior to publishing.
+ // *
+ // * If specified, the "publishFolder" is the relative path to a subfolder of the project folder.
+ // * The "rush publish" command will publish the subfolder instead of the project folder. The subfolder
+ // * must contain its own package.json file, which is typically a build output.
+ // */
+ // // "publishFolder": "temp/publish",
+ //
+ // /**
+ // * An optional version policy associated with the project. Version policies are defined
+ // * in "version-policies.json" file. See the "rush publish" documentation for more info.
+ // * NOTE: "versionPolicyName" and "shouldPublish" are alternatives; you cannot specify them both.
+ // */
+ // // "versionPolicyName": ""
+ // },
+ //
+ // {
+ // "packageName": "my-controls",
+ // "projectFolder": "libraries/my-controls",
+ // "reviewCategory": "production"
+ // },
+ //
+ // {
+ // "packageName": "my-toolchain",
+ // "projectFolder": "tools/my-toolchain",
+ // "reviewCategory": "tools"
+ // }
+ ]
}
diff --git a/version b/version
index 30f8347b6..cf648a75b 100755
--- a/version
+++ b/version
@@ -1 +1 @@
-0.0.116
+0.0.117