@zetra/citrineos-util 1.8.3-fork.3 → 1.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authorization/ApiAuthPlugin.d.ts +1 -1
- package/dist/authorization/ApiAuthPlugin.js +1 -1
- package/dist/authorization/provider/LocalByPassAuthProvider.d.ts +2 -2
- package/dist/authorization/provider/LocalByPassAuthProvider.js +1 -1
- package/dist/authorization/provider/OIDCAuthProvider.d.ts +2 -2
- package/dist/authorization/provider/OIDCAuthProvider.js +1 -1
- package/dist/authorization/rbac/RbacRulesLoader.js +1 -1
- package/dist/authorizer/RealTimeAuthorizer.d.ts +2 -2
- package/dist/authorizer/RealTimeAuthorizer.js +1 -1
- package/dist/cache/memory.d.ts +1 -1
- package/dist/cache/redis.d.ts +1 -1
- package/dist/certificate/CertificateAuthority.d.ts +2 -2
- package/dist/certificate/CertificateAuthority.js +1 -1
- package/dist/certificate/CertificateUtil.d.ts +1 -1
- package/dist/certificate/CertificateUtil.js +1 -1
- package/dist/certificate/client/acme.d.ts +1 -1
- package/dist/certificate/client/hubject.d.ts +1 -1
- package/dist/certificate/client/hubject.js +1 -1
- package/dist/files/ftpServer.d.ts +1 -1
- package/dist/files/gcpCloudStorage.d.ts +1 -1
- package/dist/files/localStorage.d.ts +1 -1
- package/dist/files/s3Storage.d.ts +1 -1
- package/dist/networkconnection/WebsocketNetworkConnection.d.ts +1 -1
- package/dist/networkconnection/WebsocketNetworkConnection.js +1 -1
- package/dist/networkconnection/authenticator/Authenticator.d.ts +1 -1
- package/dist/networkconnection/authenticator/AuthenticatorFilter.d.ts +1 -1
- package/dist/networkconnection/authenticator/BasicAuthenticationFilter.d.ts +2 -2
- package/dist/networkconnection/authenticator/BasicAuthenticationFilter.js +2 -2
- package/dist/networkconnection/authenticator/ConnectedStationFilter.d.ts +1 -1
- package/dist/networkconnection/authenticator/ConnectedStationFilter.js +1 -1
- package/dist/networkconnection/authenticator/NetworkProfileFilter.d.ts +2 -2
- package/dist/networkconnection/authenticator/NetworkProfileFilter.js +2 -2
- package/dist/networkconnection/authenticator/UnknownStationFilter.d.ts +2 -2
- package/dist/queue/kafka/receiver.d.ts +2 -2
- package/dist/queue/kafka/receiver.js +1 -1
- package/dist/queue/kafka/sender.d.ts +2 -2
- package/dist/queue/kafka/sender.js +1 -1
- package/dist/queue/rabbit-mq/receiver.d.ts +2 -2
- package/dist/queue/rabbit-mq/receiver.js +1 -1
- package/dist/queue/rabbit-mq/sender.d.ts +2 -2
- package/dist/queue/rabbit-mq/sender.js +1 -1
- package/dist/security/SignedMeterValuesUtil.d.ts +2 -2
- package/dist/security/SignedMeterValuesUtil.js +2 -2
- package/dist/util/idGenerator.d.ts +2 -2
- package/dist/util/parser.d.ts +1 -1
- package/dist/util/swagger.d.ts +1 -1
- package/dist/util/swagger.js +1 -1
- package/dist/util/validator.d.ts +2 -2
- package/dist/util/validator.js +2 -2
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FastifyPluginAsync, FastifyReply } from 'fastify';
|
|
2
2
|
import type { ILogObj } from 'tslog';
|
|
3
3
|
import { Logger } from 'tslog';
|
|
4
|
-
import type { IApiAuthProvider, UserInfo } from '@citrineos
|
|
4
|
+
import type { IApiAuthProvider, UserInfo } from '@zetra/citrineos-base';
|
|
5
5
|
/**
|
|
6
6
|
* Options for the authentication plugin
|
|
7
7
|
*/
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
import { Logger } from 'tslog';
|
|
5
5
|
import fp from 'fastify-plugin';
|
|
6
|
-
import { HttpStatus } from '@citrineos
|
|
6
|
+
import { HttpStatus } from '@zetra/citrineos-base';
|
|
7
7
|
/**
|
|
8
8
|
* Authentication plugin for Fastify
|
|
9
9
|
* This plugin adds authentication and authorization capabilities to Fastify
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { FastifyRequest } from 'fastify';
|
|
2
2
|
import type { ILogObj } from 'tslog';
|
|
3
3
|
import { Logger } from 'tslog';
|
|
4
|
-
import type { IApiAuthProvider, UserInfo } from '@citrineos
|
|
5
|
-
import { ApiAuthenticationResult, ApiAuthorizationResult } from '@citrineos
|
|
4
|
+
import type { IApiAuthProvider, UserInfo } from '@zetra/citrineos-base';
|
|
5
|
+
import { ApiAuthenticationResult, ApiAuthorizationResult } from '@zetra/citrineos-base';
|
|
6
6
|
/**
|
|
7
7
|
* A local bypass authentication provider that doesn't perform actual authentication
|
|
8
8
|
* Only for development and testing environments
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
//
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
import { Logger } from 'tslog';
|
|
5
|
-
import { ApiAuthenticationResult, ApiAuthorizationResult } from '@citrineos
|
|
5
|
+
import { ApiAuthenticationResult, ApiAuthorizationResult } from '@zetra/citrineos-base';
|
|
6
6
|
/**
|
|
7
7
|
* A local bypass authentication provider that doesn't perform actual authentication
|
|
8
8
|
* Only for development and testing environments
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { FastifyRequest } from 'fastify';
|
|
2
2
|
import type { ILogObj } from 'tslog';
|
|
3
3
|
import { Logger } from 'tslog';
|
|
4
|
-
import type { IApiAuthProvider, UserInfo } from '@citrineos
|
|
5
|
-
import { ApiAuthenticationResult, ApiAuthorizationResult } from '@citrineos
|
|
4
|
+
import type { IApiAuthProvider, UserInfo } from '@zetra/citrineos-base';
|
|
5
|
+
import { ApiAuthenticationResult, ApiAuthorizationResult } from '@zetra/citrineos-base';
|
|
6
6
|
export interface OIDCConfig {
|
|
7
7
|
jwksUri: string;
|
|
8
8
|
issuer: string;
|
|
@@ -5,7 +5,7 @@ import { Logger } from 'tslog';
|
|
|
5
5
|
import jwt from 'jsonwebtoken';
|
|
6
6
|
import jwksClient from 'jwks-rsa';
|
|
7
7
|
import JwksRsa from 'jwks-rsa';
|
|
8
|
-
import { ApiAuthenticationResult, ApiAuthorizationResult } from '@citrineos
|
|
8
|
+
import { ApiAuthenticationResult, ApiAuthorizationResult } from '@zetra/citrineos-base';
|
|
9
9
|
import { createPublicKey } from 'crypto';
|
|
10
10
|
import { RbacRulesLoader } from '../rbac/RbacRulesLoader.js';
|
|
11
11
|
/**
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
import * as fs from 'fs';
|
|
5
5
|
import { Logger } from 'tslog';
|
|
6
|
-
import { RbacRulesSchema } from '@citrineos
|
|
6
|
+
import { RbacRulesSchema } from '@zetra/citrineos-base';
|
|
7
7
|
import { UrlMatcher } from './UrlMatcher.js';
|
|
8
8
|
import path from 'path';
|
|
9
9
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type AuthorizationStatusEnumType, type ConnectorDto, type EvseDto, type IAuthorizer, type IdTokenEnumType, type IMessageContext, type SystemConfig } from '@citrineos
|
|
2
|
-
import type { Authorization, ILocationRepository } from '@citrineos
|
|
1
|
+
import { type AuthorizationStatusEnumType, type ConnectorDto, type EvseDto, type IAuthorizer, type IdTokenEnumType, type IMessageContext, type SystemConfig } from '@zetra/citrineos-base';
|
|
2
|
+
import type { Authorization, ILocationRepository } from '@zetra/citrineos-data';
|
|
3
3
|
import type { ILogObj } from 'tslog';
|
|
4
4
|
import { Logger } from 'tslog';
|
|
5
5
|
export interface RealTimeAuthorizationRequestBody {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: 2025 Contributors to the CitrineOS Project
|
|
2
2
|
//
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
import { AuthorizationStatusEnum, AuthorizationWhitelistEnum, } from '@citrineos
|
|
4
|
+
import { AuthorizationStatusEnum, AuthorizationWhitelistEnum, } from '@zetra/citrineos-base';
|
|
5
5
|
import { Logger } from 'tslog';
|
|
6
6
|
import { OidcTokenProvider } from '../authorization/index.js';
|
|
7
7
|
export class RealTimeAuthorizer {
|
package/dist/cache/memory.d.ts
CHANGED
package/dist/cache/redis.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ICache, SystemConfig } from '@citrineos
|
|
2
|
-
import { OCPP2_0_1 } from '@citrineos
|
|
1
|
+
import type { ICache, SystemConfig } from '@zetra/citrineos-base';
|
|
2
|
+
import { OCPP2_0_1 } from '@zetra/citrineos-base';
|
|
3
3
|
import type { IChargingStationCertificateAuthorityClient, IV2GCertificateAuthorityClient } from './client/interface.js';
|
|
4
4
|
import type { ILogObj } from 'tslog';
|
|
5
5
|
import { Logger } from 'tslog';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as pkijs from 'pkijs';
|
|
2
2
|
import { CertificationRequest } from 'pkijs';
|
|
3
|
-
import { Certificate, CountryNameEnumType, SignatureAlgorithmEnumType } from '@citrineos
|
|
3
|
+
import { Certificate, CountryNameEnumType, SignatureAlgorithmEnumType } from '@zetra/citrineos-data';
|
|
4
4
|
import jsrsasign from 'jsrsasign';
|
|
5
5
|
import moment from 'moment';
|
|
6
6
|
import type { ILogObj } from 'tslog';
|
|
@@ -5,7 +5,7 @@ import * as pkijs from 'pkijs';
|
|
|
5
5
|
import { CertificationRequest } from 'pkijs';
|
|
6
6
|
import * as asn1js from 'asn1js';
|
|
7
7
|
import { fromBER } from 'asn1js';
|
|
8
|
-
import { Certificate, CountryNameEnumType, SignatureAlgorithmEnumType } from '@citrineos
|
|
8
|
+
import { Certificate, CountryNameEnumType, SignatureAlgorithmEnumType } from '@zetra/citrineos-data';
|
|
9
9
|
import jsrsasign from 'jsrsasign';
|
|
10
10
|
import { fromBase64, stringToArrayBuffer } from 'pvutils';
|
|
11
11
|
import moment from 'moment';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IChargingStationCertificateAuthorityClient } from './interface.js';
|
|
2
|
-
import type { SystemConfig } from '@citrineos
|
|
2
|
+
import type { SystemConfig } from '@zetra/citrineos-base';
|
|
3
3
|
import { Client } from 'acme-client';
|
|
4
4
|
import type { ILogObj } from 'tslog';
|
|
5
5
|
import { Logger } from 'tslog';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IV2GCertificateAuthorityClient } from './interface.js';
|
|
2
|
-
import { type ICache, type SystemConfig } from '@citrineos
|
|
2
|
+
import { type ICache, type SystemConfig } from '@zetra/citrineos-base';
|
|
3
3
|
import type { ILogObj } from 'tslog';
|
|
4
4
|
import { Logger } from 'tslog';
|
|
5
5
|
export declare class Hubject implements IV2GCertificateAuthorityClient {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: 2025 Contributors to the CitrineOS Project
|
|
2
2
|
//
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
import { HttpMethod, HttpStatus, HUBJECT_DEFAULT_AUTH_TOKEN, HUBJECT_DEFAULT_BASEURL, HUBJECT_DEFAULT_CLIENTID, HUBJECT_DEFAULT_CLIENTSECRET, HUBJECT_DEFAULT_TOKENURL, } from '@citrineos
|
|
4
|
+
import { HttpMethod, HttpStatus, HUBJECT_DEFAULT_AUTH_TOKEN, HUBJECT_DEFAULT_BASEURL, HUBJECT_DEFAULT_CLIENTID, HUBJECT_DEFAULT_CLIENTSECRET, HUBJECT_DEFAULT_TOKENURL, } from '@zetra/citrineos-base';
|
|
5
5
|
import { Logger } from 'tslog';
|
|
6
6
|
import { createPemBlock } from '../CertificateUtil.js';
|
|
7
7
|
export class Hubject {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BootstrapConfig, ConfigStore, SystemConfig } from '@citrineos
|
|
1
|
+
import type { BootstrapConfig, ConfigStore, SystemConfig } from '@zetra/citrineos-base';
|
|
2
2
|
import type { ILogObj } from 'tslog';
|
|
3
3
|
import { Logger } from 'tslog';
|
|
4
4
|
export declare class GcpCloudStorage implements ConfigStore {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ConfigStore, SystemConfig } from '@citrineos
|
|
1
|
+
import type { ConfigStore, SystemConfig } from '@zetra/citrineos-base';
|
|
2
2
|
import type { ILogObj } from 'tslog';
|
|
3
3
|
import { Logger } from 'tslog';
|
|
4
4
|
export declare class LocalStorage implements ConfigStore {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BootstrapConfig, ConfigStore, SystemConfig } from '@citrineos
|
|
1
|
+
import type { BootstrapConfig, ConfigStore, SystemConfig } from '@zetra/citrineos-base';
|
|
2
2
|
import type { ILogObj } from 'tslog';
|
|
3
3
|
import { Logger } from 'tslog';
|
|
4
4
|
export declare class S3Storage implements ConfigStore {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IAuthenticator, ICache, IMessageRouter, INetworkConnection, SystemConfig, WebsocketServerConfig } from '@citrineos
|
|
1
|
+
import type { IAuthenticator, ICache, IMessageRouter, INetworkConnection, SystemConfig, WebsocketServerConfig } from '@zetra/citrineos-base';
|
|
2
2
|
import type { ILogObj } from 'tslog';
|
|
3
3
|
import { Logger } from 'tslog';
|
|
4
4
|
export declare class WebsocketNetworkConnection implements INetworkConnection {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CacheNamespace, createIdentifier, getStationIdFromIdentifier, getTenantIdFromIdentifier, } from '@citrineos
|
|
1
|
+
import { CacheNamespace, createIdentifier, getStationIdFromIdentifier, getTenantIdFromIdentifier, } from '@zetra/citrineos-base';
|
|
2
2
|
import fs from 'fs';
|
|
3
3
|
import * as http from 'http';
|
|
4
4
|
import * as https from 'https';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AuthenticationOptions, IAuthenticator } from '@citrineos
|
|
1
|
+
import type { AuthenticationOptions, IAuthenticator } from '@zetra/citrineos-base';
|
|
2
2
|
import type { ILogObj } from 'tslog';
|
|
3
3
|
import { Logger } from 'tslog';
|
|
4
4
|
import { IncomingMessage } from 'http';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IncomingMessage } from 'http';
|
|
2
2
|
import type { ILogObj } from 'tslog';
|
|
3
3
|
import { Logger } from 'tslog';
|
|
4
|
-
import type { AuthenticationOptions } from '@citrineos
|
|
4
|
+
import type { AuthenticationOptions } from '@zetra/citrineos-base';
|
|
5
5
|
export declare abstract class AuthenticatorFilter {
|
|
6
6
|
protected _logger: Logger<ILogObj>;
|
|
7
7
|
protected constructor(logger?: Logger<ILogObj>);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ILogObj } from 'tslog';
|
|
2
2
|
import { Logger } from 'tslog';
|
|
3
|
-
import type { IDeviceModelRepository } from '@citrineos
|
|
3
|
+
import type { IDeviceModelRepository } from '@zetra/citrineos-data';
|
|
4
4
|
import { IncomingMessage } from 'http';
|
|
5
5
|
import { AuthenticatorFilter } from './AuthenticatorFilter.js';
|
|
6
|
-
import type { AuthenticationOptions } from '@citrineos
|
|
6
|
+
import type { AuthenticationOptions } from '@zetra/citrineos-base';
|
|
7
7
|
/**
|
|
8
8
|
* Filter used to authenticate incoming HTTP requests based on basic authorization header.
|
|
9
9
|
* It only applies when the security profile is set to 1 or 2.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Logger } from 'tslog';
|
|
2
|
-
import { CryptoUtils } from '@citrineos
|
|
2
|
+
import { CryptoUtils } from '@zetra/citrineos-data';
|
|
3
3
|
import { IncomingMessage } from 'http';
|
|
4
4
|
import { extractBasicCredentials } from '../../util/RequestOperations.js';
|
|
5
5
|
import { AuthenticatorFilter } from './AuthenticatorFilter.js';
|
|
6
|
-
import { OCPP2_0_1 } from '@citrineos
|
|
6
|
+
import { OCPP2_0_1 } from '@zetra/citrineos-base';
|
|
7
7
|
import { UpgradeAuthenticationError } from './errors/AuthenticationError.js';
|
|
8
8
|
/**
|
|
9
9
|
* Filter used to authenticate incoming HTTP requests based on basic authorization header.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ILogObj } from 'tslog';
|
|
2
2
|
import { Logger } from 'tslog';
|
|
3
|
-
import type { IDeviceModelRepository } from '@citrineos
|
|
3
|
+
import type { IDeviceModelRepository } from '@zetra/citrineos-data';
|
|
4
4
|
import { IncomingMessage } from 'http';
|
|
5
5
|
import { AuthenticatorFilter } from './AuthenticatorFilter.js';
|
|
6
|
-
import type { AuthenticationOptions } from '@citrineos
|
|
6
|
+
import type { AuthenticationOptions } from '@zetra/citrineos-base';
|
|
7
7
|
/**
|
|
8
8
|
* Filter used to block connections when charging stations attempt to connect to disallowed security profiles
|
|
9
9
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Logger } from 'tslog';
|
|
2
|
-
import { ChargingStationNetworkProfile, ServerNetworkProfile } from '@citrineos
|
|
2
|
+
import { ChargingStationNetworkProfile, ServerNetworkProfile } from '@zetra/citrineos-data';
|
|
3
3
|
import { IncomingMessage } from 'http';
|
|
4
4
|
import { AuthenticatorFilter } from './AuthenticatorFilter.js';
|
|
5
|
-
import { OCPP2_0_1 } from '@citrineos
|
|
5
|
+
import { OCPP2_0_1 } from '@zetra/citrineos-base';
|
|
6
6
|
import { UpgradeAuthenticationError } from './errors/AuthenticationError.js';
|
|
7
7
|
/**
|
|
8
8
|
* Filter used to block connections when charging stations attempt to connect to disallowed security profiles
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ILogObj } from 'tslog';
|
|
2
2
|
import { Logger } from 'tslog';
|
|
3
|
-
import type { ILocationRepository } from '@citrineos
|
|
3
|
+
import type { ILocationRepository } from '@zetra/citrineos-data';
|
|
4
4
|
import { IncomingMessage } from 'http';
|
|
5
5
|
import { AuthenticatorFilter } from './AuthenticatorFilter.js';
|
|
6
|
-
import type { AuthenticationOptions } from '@citrineos
|
|
6
|
+
import type { AuthenticationOptions } from '@zetra/citrineos-base';
|
|
7
7
|
/**
|
|
8
8
|
* Filter used to block connections from charging stations that are not recognized in the system.
|
|
9
9
|
* It only applies when unknown charging stations are not allowed.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CallAction, IMessageHandler, IModule, SystemConfig } from '@citrineos
|
|
2
|
-
import { AbstractMessageHandler, CircuitBreaker } from '@citrineos
|
|
1
|
+
import type { CallAction, IMessageHandler, IModule, SystemConfig } from '@zetra/citrineos-base';
|
|
2
|
+
import { AbstractMessageHandler, CircuitBreaker } from '@zetra/citrineos-base';
|
|
3
3
|
import type { ILogObj } from 'tslog';
|
|
4
4
|
import { Logger } from 'tslog';
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AbstractMessageHandler, CircuitBreaker, Message, OcppError, RetryMessageError, } from '@citrineos
|
|
1
|
+
import { AbstractMessageHandler, CircuitBreaker, Message, OcppError, RetryMessageError, } from '@zetra/citrineos-base';
|
|
2
2
|
import { plainToInstance } from 'class-transformer';
|
|
3
3
|
import { Kafka } from 'kafkajs';
|
|
4
4
|
import { Logger } from 'tslog';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { IMessage, IMessageConfirmation, IMessageSender, OcppRequest, OcppResponse, SystemConfig } from '@citrineos
|
|
2
|
-
import { AbstractMessageSender, CircuitBreaker, MessageState, OcppError } from '@citrineos
|
|
1
|
+
import type { IMessage, IMessageConfirmation, IMessageSender, OcppRequest, OcppResponse, SystemConfig } from '@zetra/citrineos-base';
|
|
2
|
+
import { AbstractMessageSender, CircuitBreaker, MessageState, OcppError } from '@zetra/citrineos-base';
|
|
3
3
|
import type { ILogObj } from 'tslog';
|
|
4
4
|
import { Logger } from 'tslog';
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AbstractMessageSender, CircuitBreaker, MessageState, OcppError } from '@citrineos
|
|
1
|
+
import { AbstractMessageSender, CircuitBreaker, MessageState, OcppError } from '@zetra/citrineos-base';
|
|
2
2
|
import { Kafka } from 'kafkajs';
|
|
3
3
|
import { Logger } from 'tslog';
|
|
4
4
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CallAction, ICache, IModule, SystemConfig } from '@citrineos
|
|
2
|
-
import { AbstractMessageHandler, CircuitBreaker } from '@citrineos
|
|
1
|
+
import type { CallAction, ICache, IModule, SystemConfig } from '@zetra/citrineos-base';
|
|
2
|
+
import { AbstractMessageHandler, CircuitBreaker } from '@zetra/citrineos-base';
|
|
3
3
|
import * as amqplib from 'amqplib';
|
|
4
4
|
import type { ILogObj } from 'tslog';
|
|
5
5
|
import { Logger } from 'tslog';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: 2025 Contributors to the CitrineOS Project
|
|
2
2
|
//
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
import { AbstractMessageHandler, CacheNamespace, CircuitBreaker, Message, RetryMessageError, } from '@citrineos
|
|
4
|
+
import { AbstractMessageHandler, CacheNamespace, CircuitBreaker, Message, RetryMessageError, } from '@zetra/citrineos-base';
|
|
5
5
|
import * as amqplib from 'amqplib';
|
|
6
6
|
import { Logger } from 'tslog';
|
|
7
7
|
import { MemoryCache } from '../../index.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { IMessage, IMessageConfirmation, IMessageSender, OcppRequest, OcppResponse, SystemConfig } from '@citrineos
|
|
2
|
-
import { AbstractMessageSender, CircuitBreaker, MessageState, OcppError } from '@citrineos
|
|
1
|
+
import type { IMessage, IMessageConfirmation, IMessageSender, OcppRequest, OcppResponse, SystemConfig } from '@zetra/citrineos-base';
|
|
2
|
+
import { AbstractMessageSender, CircuitBreaker, MessageState, OcppError } from '@zetra/citrineos-base';
|
|
3
3
|
import * as amqplib from 'amqplib';
|
|
4
4
|
import type { ILogObj } from 'tslog';
|
|
5
5
|
import { Logger } from 'tslog';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AbstractMessageSender, CircuitBreaker, MessageState, OcppError } from '@citrineos
|
|
1
|
+
import { AbstractMessageSender, CircuitBreaker, MessageState, OcppError } from '@zetra/citrineos-base';
|
|
2
2
|
import * as amqplib from 'amqplib';
|
|
3
3
|
import { instanceToPlain } from 'class-transformer';
|
|
4
4
|
import { Logger } from 'tslog';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BootstrapConfig, IFileStorage, SystemConfig } from '@citrineos
|
|
2
|
-
import { OCPP2_0_1 } from '@citrineos
|
|
1
|
+
import type { BootstrapConfig, IFileStorage, SystemConfig } from '@zetra/citrineos-base';
|
|
2
|
+
import { OCPP2_0_1 } from '@zetra/citrineos-base';
|
|
3
3
|
import type { ILogObj } from 'tslog';
|
|
4
4
|
import { Logger } from 'tslog';
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { sequelize } from '@citrineos
|
|
2
|
-
import { OCPP2_0_1, SignedMeterValuesConfig } from '@citrineos
|
|
1
|
+
import { sequelize } from '@zetra/citrineos-data';
|
|
2
|
+
import { OCPP2_0_1, SignedMeterValuesConfig } from '@zetra/citrineos-base';
|
|
3
3
|
import { Logger } from 'tslog';
|
|
4
4
|
import * as crypto from 'node:crypto';
|
|
5
5
|
import { stringToArrayBuffer } from 'pvutils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ChargingStationSequenceTypeEnumType } from '@citrineos
|
|
2
|
-
import type { IChargingStationSequenceRepository } from '@citrineos
|
|
1
|
+
import type { ChargingStationSequenceTypeEnumType } from '@zetra/citrineos-base';
|
|
2
|
+
import type { IChargingStationSequenceRepository } from '@zetra/citrineos-data';
|
|
3
3
|
export declare class IdGenerator {
|
|
4
4
|
private _stationSequenceRepository;
|
|
5
5
|
constructor(stationSequenceRepository: IChargingStationSequenceRepository);
|
package/dist/util/parser.d.ts
CHANGED
package/dist/util/swagger.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SystemConfig } from '@citrineos
|
|
1
|
+
import type { SystemConfig } from '@zetra/citrineos-base';
|
|
2
2
|
import type { FastifyInstance, FastifyRequest } from 'fastify';
|
|
3
3
|
export declare const getHeaderValue: (headers: string[], key: string) => string | undefined;
|
|
4
4
|
export declare const getAuthorizationTokenFromRequest: (request: FastifyRequest) => string;
|
package/dist/util/swagger.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: 2025 Contributors to the CitrineOS Project
|
|
2
2
|
//
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
import { HttpHeader, HttpStatus, UnauthorizedError } from '@citrineos
|
|
4
|
+
import { HttpHeader, HttpStatus, UnauthorizedError } from '@zetra/citrineos-base';
|
|
5
5
|
import * as FastifyAuth from '@fastify/auth';
|
|
6
6
|
import fastifySwagger from '@fastify/swagger';
|
|
7
7
|
import fastifySwaggerUi from '@fastify/swagger-ui';
|
package/dist/util/validator.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { OCPP2_0_1 } from '@citrineos
|
|
2
|
-
import type { IChargingProfileRepository, IDeviceModelRepository, ITransactionEventRepository } from '@citrineos
|
|
1
|
+
import { OCPP2_0_1 } from '@zetra/citrineos-base';
|
|
2
|
+
import type { IChargingProfileRepository, IDeviceModelRepository, ITransactionEventRepository } from '@zetra/citrineos-data';
|
|
3
3
|
import type { ILogObj } from 'tslog';
|
|
4
4
|
import { Logger } from 'tslog';
|
|
5
5
|
/**
|
package/dist/util/validator.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: 2025 Contributors to the CitrineOS Project
|
|
2
2
|
//
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
import { OCPP2_0_1 } from '@citrineos
|
|
5
|
-
import { VariableAttribute } from '@citrineos
|
|
4
|
+
import { OCPP2_0_1 } from '@zetra/citrineos-base';
|
|
5
|
+
import { VariableAttribute } from '@zetra/citrineos-data';
|
|
6
6
|
import { Logger } from 'tslog';
|
|
7
7
|
import { calculateCheckDigit } from './emaidCheckDigitCalculator.js';
|
|
8
8
|
import { getNumberOfFractionDigit } from './parser.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zetra/citrineos-util",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.4",
|
|
4
4
|
"description": "The OCPP util module which supplies helpful utilities like cache and queue connectors, etc.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"@types/jsrsasign": "10.5.14"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@zetra/citrineos-base": "1.8.
|
|
28
|
-
"@zetra/citrineos-data": "1.8.
|
|
27
|
+
"@zetra/citrineos-base": "1.8.4",
|
|
28
|
+
"@zetra/citrineos-data": "1.8.4",
|
|
29
29
|
"@fastify/swagger": "9.4.0",
|
|
30
30
|
"@fastify/swagger-ui": "5.2.0",
|
|
31
31
|
"@google-cloud/storage": "7.18.0",
|