@corelicense/node 0.2.0 → 0.5.1
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/LICENSE +21 -0
- package/README.md +55 -98
- package/dist/client/license-api-client.d.ts +3 -2
- package/dist/client/license-api-client.d.ts.map +1 -1
- package/dist/client/license-api-client.js +44 -4
- package/dist/client/license-api-client.js.map +1 -1
- package/dist/client/map-client-error.d.ts +5 -0
- package/dist/client/map-client-error.d.ts.map +1 -0
- package/dist/client/map-client-error.js +63 -0
- package/dist/client/map-client-error.js.map +1 -0
- package/dist/client/public-keys-client.d.ts.map +1 -1
- package/dist/client/public-keys-client.js +20 -2
- package/dist/client/public-keys-client.js.map +1 -1
- package/dist/core-license.d.ts +19 -1
- package/dist/core-license.d.ts.map +1 -1
- package/dist/core-license.js +195 -51
- package/dist/core-license.js.map +1 -1
- package/dist/crypto/verify-policy-token.d.ts.map +1 -1
- package/dist/crypto/verify-policy-token.js +75 -5
- package/dist/crypto/verify-policy-token.js.map +1 -1
- package/dist/env/load-options-from-env.d.ts.map +1 -1
- package/dist/env/load-options-from-env.js +2 -1
- package/dist/env/load-options-from-env.js.map +1 -1
- package/dist/env/resolve-api-url.js +1 -1
- package/dist/env/resolve-api-url.js.map +1 -1
- package/dist/errors/api-error.d.ts +17 -0
- package/dist/errors/api-error.d.ts.map +1 -0
- package/dist/errors/api-error.js +43 -0
- package/dist/errors/api-error.js.map +1 -0
- package/dist/errors/codes.d.ts +40 -0
- package/dist/errors/codes.d.ts.map +1 -0
- package/dist/errors/codes.js +39 -0
- package/dist/errors/codes.js.map +1 -0
- package/dist/errors/config-error.d.ts +7 -0
- package/dist/errors/config-error.d.ts.map +1 -0
- package/dist/errors/config-error.js +21 -0
- package/dist/errors/config-error.js.map +1 -0
- package/dist/errors/feature-error.d.ts +2 -1
- package/dist/errors/feature-error.d.ts.map +1 -1
- package/dist/errors/feature-error.js +13 -2
- package/dist/errors/feature-error.js.map +1 -1
- package/dist/errors/index.d.ts +6 -0
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +6 -0
- package/dist/errors/index.js.map +1 -1
- package/dist/errors/license-error.d.ts +48 -7
- package/dist/errors/license-error.d.ts.map +1 -1
- package/dist/errors/license-error.js +104 -14
- package/dist/errors/license-error.js.map +1 -1
- package/dist/errors/module-error.d.ts +7 -0
- package/dist/errors/module-error.d.ts.map +1 -0
- package/dist/errors/module-error.js +20 -0
- package/dist/errors/module-error.js.map +1 -0
- package/dist/errors/policy-error.d.ts +10 -1
- package/dist/errors/policy-error.d.ts.map +1 -1
- package/dist/errors/policy-error.js +16 -2
- package/dist/errors/policy-error.js.map +1 -1
- package/dist/errors/quota-error.d.ts +2 -1
- package/dist/errors/quota-error.d.ts.map +1 -1
- package/dist/errors/quota-error.js +15 -2
- package/dist/errors/quota-error.js.map +1 -1
- package/dist/errors/runtime-error.d.ts +12 -0
- package/dist/errors/runtime-error.d.ts.map +1 -0
- package/dist/errors/runtime-error.js +37 -0
- package/dist/errors/runtime-error.js.map +1 -0
- package/dist/errors/throw-for-status.d.ts +3 -0
- package/dist/errors/throw-for-status.d.ts.map +1 -0
- package/dist/errors/throw-for-status.js +21 -0
- package/dist/errors/throw-for-status.js.map +1 -0
- package/dist/guards/cli-guard.d.ts.map +1 -1
- package/dist/guards/cli-guard.js +12 -6
- package/dist/guards/cli-guard.js.map +1 -1
- package/dist/guards/express-middleware.d.ts.map +1 -1
- package/dist/guards/express-middleware.js +1 -5
- package/dist/guards/express-middleware.js.map +1 -1
- package/dist/guards/express-routes.d.ts +9 -0
- package/dist/guards/express-routes.d.ts.map +1 -0
- package/dist/guards/express-routes.js +12 -0
- package/dist/guards/express-routes.js.map +1 -0
- package/dist/guards/fastify-plugin.d.ts.map +1 -1
- package/dist/guards/fastify-plugin.js +1 -5
- package/dist/guards/fastify-plugin.js.map +1 -1
- package/dist/guards/feature-guard.d.ts +1 -0
- package/dist/guards/feature-guard.d.ts.map +1 -1
- package/dist/guards/feature-guard.js +14 -0
- package/dist/guards/feature-guard.js.map +1 -1
- package/dist/guards/nest-exception-filter.d.ts +6 -0
- package/dist/guards/nest-exception-filter.d.ts.map +1 -0
- package/dist/guards/nest-exception-filter.js +60 -0
- package/dist/guards/nest-exception-filter.js.map +1 -0
- package/dist/guards/nest-feature-guard.d.ts +10 -0
- package/dist/guards/nest-feature-guard.d.ts.map +1 -0
- package/dist/guards/nest-feature-guard.js +72 -0
- package/dist/guards/nest-feature-guard.js.map +1 -0
- package/dist/guards/nest-module.d.ts +3 -0
- package/dist/guards/nest-module.d.ts.map +1 -1
- package/dist/guards/nest-module.js +13 -2
- package/dist/guards/nest-module.js.map +1 -1
- package/dist/guards/nestjs.d.ts +6 -0
- package/dist/guards/nestjs.d.ts.map +1 -0
- package/dist/guards/nestjs.js +6 -0
- package/dist/guards/nestjs.js.map +1 -0
- package/dist/guards/quota-guard.d.ts.map +1 -1
- package/dist/guards/quota-guard.js +6 -1
- package/dist/guards/quota-guard.js.map +1 -1
- package/dist/guards/require-feature.decorator.d.ts +3 -0
- package/dist/guards/require-feature.decorator.d.ts.map +1 -0
- package/dist/guards/require-feature.decorator.js +4 -0
- package/dist/guards/require-feature.decorator.js.map +1 -0
- package/dist/guards/worker-guard.d.ts.map +1 -1
- package/dist/guards/worker-guard.js +8 -6
- package/dist/guards/worker-guard.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/instance/domain-hash.d.ts +3 -0
- package/dist/instance/domain-hash.d.ts.map +1 -0
- package/dist/instance/domain-hash.js +11 -0
- package/dist/instance/domain-hash.js.map +1 -0
- package/dist/instance/instance-id.d.ts.map +1 -1
- package/dist/instance/instance-id.js +1 -6
- package/dist/instance/instance-id.js.map +1 -1
- package/dist/runtime/licensed-module-registry.d.ts +22 -0
- package/dist/runtime/licensed-module-registry.d.ts.map +1 -0
- package/dist/runtime/licensed-module-registry.js +80 -0
- package/dist/runtime/licensed-module-registry.js.map +1 -0
- package/dist/runtime/licensed-service-container.d.ts +23 -0
- package/dist/runtime/licensed-service-container.d.ts.map +1 -0
- package/dist/runtime/licensed-service-container.js +89 -0
- package/dist/runtime/licensed-service-container.js.map +1 -0
- package/dist/runtime/licensed-service.d.ts +7 -0
- package/dist/runtime/licensed-service.d.ts.map +1 -0
- package/dist/runtime/licensed-service.js +10 -0
- package/dist/runtime/licensed-service.js.map +1 -0
- package/dist/runtime/module-registry.d.ts.map +1 -1
- package/dist/runtime/module-registry.js +2 -1
- package/dist/runtime/module-registry.js.map +1 -1
- package/dist/runtime/service-container.d.ts.map +1 -1
- package/dist/runtime/service-container.js +2 -1
- package/dist/runtime/service-container.js.map +1 -1
- package/dist/types/bootstrap.d.ts +32 -0
- package/dist/types/bootstrap.d.ts.map +1 -0
- package/dist/types/bootstrap.js +2 -0
- package/dist/types/bootstrap.js.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/options.d.ts +14 -3
- package/dist/types/options.d.ts.map +1 -1
- package/dist/types/policy.d.ts +2 -0
- package/dist/types/policy.d.ts.map +1 -1
- package/docs/api-reference.md +210 -0
- package/docs/installation.md +188 -0
- package/docs/integration.md +789 -0
- package/package.json +23 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-api-url.js","sourceRoot":"","sources":["../../src/env/resolve-api-url.ts"],"names":[],"mappings":"AAEA,MAAM,qBAAqB,GAAG,MAAM,CAAC;AACrC,MAAM,eAAe,GAAG,
|
|
1
|
+
{"version":3,"file":"resolve-api-url.js","sourceRoot":"","sources":["../../src/env/resolve-api-url.ts"],"names":[],"mappings":"AAEA,MAAM,qBAAqB,GAAG,MAAM,CAAC;AACrC,MAAM,eAAe,GAAG,6BAA6B,CAAC;AAMtD,MAAM,UAAU,eAAe,CAAC,MAAc;IAC5C,OA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AC;IAED,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,EAAE,CAAC;IACxD,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,eAAe,CAAC,OAAO,CAAC,CAAC;IAClC,CAAC;IAED,OAAO,eAAe,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type LicenseErrorCodeValue } from './codes.js';
|
|
2
|
+
import { LicenseError, type LicenseErrorOptions } from './license-error.js';
|
|
3
|
+
export interface LicenseApiErrorOptions extends Omit<LicenseErrorOptions, 'code'> {
|
|
4
|
+
code?: LicenseErrorCodeValue;
|
|
5
|
+
httpStatus?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare class LicenseApiError extends LicenseError {
|
|
8
|
+
readonly httpStatus?: number;
|
|
9
|
+
constructor(message: string, options?: LicenseApiErrorOptions);
|
|
10
|
+
toJSON(): Record<string, unknown>;
|
|
11
|
+
}
|
|
12
|
+
export declare class PublicKeysError extends LicenseError {
|
|
13
|
+
readonly httpStatus?: number;
|
|
14
|
+
constructor(message: string, options?: LicenseApiErrorOptions);
|
|
15
|
+
toJSON(): Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=api-error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-error.d.ts","sourceRoot":"","sources":["../../src/errors/api-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE5E,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,mBAAmB,EAAE,MAAM,CAAC;IAC/E,IAAI,CAAC,EAAE,qBAAqB,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,qBAAa,eAAgB,SAAQ,YAAY;IAC/C,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;gBAEjB,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,sBAA2B;IAYxD,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAM3C;AAED,qBAAa,eAAgB,SAAQ,YAAY;IAC/C,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;gBAEjB,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,sBAA2B;IAYxD,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAM3C"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { LicenseErrorCode } from './codes.js';
|
|
2
|
+
import { LicenseError } from './license-error.js';
|
|
3
|
+
export class LicenseApiError extends LicenseError {
|
|
4
|
+
httpStatus;
|
|
5
|
+
constructor(message, options = {}) {
|
|
6
|
+
super(message, {
|
|
7
|
+
code: options.code ?? LicenseErrorCode.LICENSE_API_ERROR,
|
|
8
|
+
status: 'invalid',
|
|
9
|
+
source: options.source ?? 'license-api-client.post',
|
|
10
|
+
cause: options.cause,
|
|
11
|
+
retryable: true,
|
|
12
|
+
});
|
|
13
|
+
this.name = 'LicenseApiError';
|
|
14
|
+
this.httpStatus = options.httpStatus;
|
|
15
|
+
}
|
|
16
|
+
toJSON() {
|
|
17
|
+
return {
|
|
18
|
+
...super.toJSON(),
|
|
19
|
+
httpStatus: this.httpStatus,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export class PublicKeysError extends LicenseError {
|
|
24
|
+
httpStatus;
|
|
25
|
+
constructor(message, options = {}) {
|
|
26
|
+
super(message, {
|
|
27
|
+
code: options.code ?? LicenseErrorCode.PUBLIC_KEYS_FETCH_FAILED,
|
|
28
|
+
status: 'invalid',
|
|
29
|
+
source: options.source ?? 'public-keys-client.fetchProductKeys',
|
|
30
|
+
cause: options.cause,
|
|
31
|
+
retryable: true,
|
|
32
|
+
});
|
|
33
|
+
this.name = 'PublicKeysError';
|
|
34
|
+
this.httpStatus = options.httpStatus;
|
|
35
|
+
}
|
|
36
|
+
toJSON() {
|
|
37
|
+
return {
|
|
38
|
+
...super.toJSON(),
|
|
39
|
+
httpStatus: this.httpStatus,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=api-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-error.js","sourceRoot":"","sources":["../../src/errors/api-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAA8B,MAAM,YAAY,CAAC;AAC1E,OAAO,EAAE,YAAY,EAA4B,MAAM,oBAAoB,CAAC;AAO5E,MAAM,OAAO,eAAgB,SAAQ,YAAY;IACtC,UAAU,CAAU;IAE7B,YAAY,OAAe,EAAE,UAAkC,EAAE;QAC/D,KAAK,CAAC,OAAO,EAAE;YACb,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,gBAAgB,CAAC,iBAAiB;YACxD,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,yBAAyB;YACnD,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,SAAS,EAAE,IAAI;SAChB,CAAC,CAAC;QACH,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;QAC9B,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IACvC,CAAC;IAEQ,MAAM;QACb,OAAO;YACL,GAAG,KAAK,CAAC,MAAM,EAAE;YACjB,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,eAAgB,SAAQ,YAAY;IACtC,UAAU,CAAU;IAE7B,YAAY,OAAe,EAAE,UAAkC,EAAE;QAC/D,KAAK,CAAC,OAAO,EAAE;YACb,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,gBAAgB,CAAC,wBAAwB;YAC/D,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,qCAAqC;YAC/D,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,SAAS,EAAE,IAAI;SAChB,CAAC,CAAC;QACH,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;QAC9B,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IACvC,CAAC;IAEQ,MAAM;QACb,OAAO;YACL,GAAG,KAAK,CAAC,MAAM,EAAE;YACjB,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stable machine-readable error codes for CoreLicense SDK.
|
|
3
|
+
* Use `code` + `source` to locate failures and choose handling in app code.
|
|
4
|
+
*/
|
|
5
|
+
export declare const LicenseErrorCode: {
|
|
6
|
+
readonly LICENSE_ERROR: "LICENSE_ERROR";
|
|
7
|
+
readonly LICENSE_REVOKED: "LICENSE_REVOKED";
|
|
8
|
+
readonly LICENSE_SUSPENDED: "LICENSE_SUSPENDED";
|
|
9
|
+
readonly LICENSE_EXPIRED: "LICENSE_EXPIRED";
|
|
10
|
+
readonly LICENSE_INVALID: "LICENSE_INVALID";
|
|
11
|
+
readonly OFFLINE_GRACE_EXPIRED: "OFFLINE_GRACE_EXPIRED";
|
|
12
|
+
readonly RATE_LIMITED: "RATE_LIMITED";
|
|
13
|
+
readonly INSTANCE_BLOCKED: "INSTANCE_BLOCKED";
|
|
14
|
+
readonly MAX_INSTANCES: "MAX_INSTANCES";
|
|
15
|
+
readonly BOOT_NOT_CALLED: "BOOT_NOT_CALLED";
|
|
16
|
+
readonly POLICY_NOT_AVAILABLE: "POLICY_NOT_AVAILABLE";
|
|
17
|
+
readonly RUNTIME_CONFIG_UNAVAILABLE: "RUNTIME_CONFIG_UNAVAILABLE";
|
|
18
|
+
readonly POLICY_TOKEN_MISSING: "POLICY_TOKEN_MISSING";
|
|
19
|
+
readonly POLICY_LOAD_FAILED: "POLICY_LOAD_FAILED";
|
|
20
|
+
readonly POLICY_PRODUCT_MISMATCH: "POLICY_PRODUCT_MISMATCH";
|
|
21
|
+
readonly POLICY_INSTANCE_MISMATCH: "POLICY_INSTANCE_MISMATCH";
|
|
22
|
+
readonly INSTANCE_ID_UNRESOLVED: "INSTANCE_ID_UNRESOLVED";
|
|
23
|
+
readonly POLICY_SIGNATURE_ERROR: "POLICY_SIGNATURE_ERROR";
|
|
24
|
+
readonly POLICY_FIELD_MISSING: "POLICY_FIELD_MISSING";
|
|
25
|
+
readonly PUBLIC_KEY_PINNED_MISMATCH: "PUBLIC_KEY_PINNED_MISMATCH";
|
|
26
|
+
readonly LICENSE_API_ERROR: "LICENSE_API_ERROR";
|
|
27
|
+
readonly LICENSE_API_TIMEOUT: "LICENSE_API_TIMEOUT";
|
|
28
|
+
readonly PUBLIC_KEYS_FETCH_FAILED: "PUBLIC_KEYS_FETCH_FAILED";
|
|
29
|
+
readonly PUBLIC_KEYS_EMPTY: "PUBLIC_KEYS_EMPTY";
|
|
30
|
+
readonly CONFIG_MISSING_ENV: "CONFIG_MISSING_ENV";
|
|
31
|
+
readonly FEATURE_DISABLED: "FEATURE_DISABLED";
|
|
32
|
+
readonly MODULE_NOT_LICENSED: "MODULE_NOT_LICENSED";
|
|
33
|
+
readonly MODULE_NOT_REGISTERED: "MODULE_NOT_REGISTERED";
|
|
34
|
+
readonly SERVICE_NOT_BOUND: "SERVICE_NOT_BOUND";
|
|
35
|
+
readonly QUOTA_EXCEEDED: "QUOTA_EXCEEDED";
|
|
36
|
+
readonly COMMAND_NOT_ALLOWED: "COMMAND_NOT_ALLOWED";
|
|
37
|
+
readonly WORKER_NOT_ALLOWED: "WORKER_NOT_ALLOWED";
|
|
38
|
+
};
|
|
39
|
+
export type LicenseErrorCodeValue = (typeof LicenseErrorCode)[keyof typeof LicenseErrorCode];
|
|
40
|
+
//# sourceMappingURL=codes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codes.d.ts","sourceRoot":"","sources":["../../src/errors/codes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuCnB,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stable machine-readable error codes for CoreLicense SDK.
|
|
3
|
+
* Use `code` + `source` to locate failures and choose handling in app code.
|
|
4
|
+
*/
|
|
5
|
+
export const LicenseErrorCode = {
|
|
6
|
+
LICENSE_ERROR: 'LICENSE_ERROR',
|
|
7
|
+
LICENSE_REVOKED: 'LICENSE_REVOKED',
|
|
8
|
+
LICENSE_SUSPENDED: 'LICENSE_SUSPENDED',
|
|
9
|
+
LICENSE_EXPIRED: 'LICENSE_EXPIRED',
|
|
10
|
+
LICENSE_INVALID: 'LICENSE_INVALID',
|
|
11
|
+
OFFLINE_GRACE_EXPIRED: 'OFFLINE_GRACE_EXPIRED',
|
|
12
|
+
RATE_LIMITED: 'RATE_LIMITED',
|
|
13
|
+
INSTANCE_BLOCKED: 'INSTANCE_BLOCKED',
|
|
14
|
+
MAX_INSTANCES: 'MAX_INSTANCES',
|
|
15
|
+
BOOT_NOT_CALLED: 'BOOT_NOT_CALLED',
|
|
16
|
+
POLICY_NOT_AVAILABLE: 'POLICY_NOT_AVAILABLE',
|
|
17
|
+
RUNTIME_CONFIG_UNAVAILABLE: 'RUNTIME_CONFIG_UNAVAILABLE',
|
|
18
|
+
POLICY_TOKEN_MISSING: 'POLICY_TOKEN_MISSING',
|
|
19
|
+
POLICY_LOAD_FAILED: 'POLICY_LOAD_FAILED',
|
|
20
|
+
POLICY_PRODUCT_MISMATCH: 'POLICY_PRODUCT_MISMATCH',
|
|
21
|
+
POLICY_INSTANCE_MISMATCH: 'POLICY_INSTANCE_MISMATCH',
|
|
22
|
+
INSTANCE_ID_UNRESOLVED: 'INSTANCE_ID_UNRESOLVED',
|
|
23
|
+
POLICY_SIGNATURE_ERROR: 'POLICY_SIGNATURE_ERROR',
|
|
24
|
+
POLICY_FIELD_MISSING: 'POLICY_FIELD_MISSING',
|
|
25
|
+
PUBLIC_KEY_PINNED_MISMATCH: 'PUBLIC_KEY_PINNED_MISMATCH',
|
|
26
|
+
LICENSE_API_ERROR: 'LICENSE_API_ERROR',
|
|
27
|
+
LICENSE_API_TIMEOUT: 'LICENSE_API_TIMEOUT',
|
|
28
|
+
PUBLIC_KEYS_FETCH_FAILED: 'PUBLIC_KEYS_FETCH_FAILED',
|
|
29
|
+
PUBLIC_KEYS_EMPTY: 'PUBLIC_KEYS_EMPTY',
|
|
30
|
+
CONFIG_MISSING_ENV: 'CONFIG_MISSING_ENV',
|
|
31
|
+
FEATURE_DISABLED: 'FEATURE_DISABLED',
|
|
32
|
+
MODULE_NOT_LICENSED: 'MODULE_NOT_LICENSED',
|
|
33
|
+
MODULE_NOT_REGISTERED: 'MODULE_NOT_REGISTERED',
|
|
34
|
+
SERVICE_NOT_BOUND: 'SERVICE_NOT_BOUND',
|
|
35
|
+
QUOTA_EXCEEDED: 'QUOTA_EXCEEDED',
|
|
36
|
+
COMMAND_NOT_ALLOWED: 'COMMAND_NOT_ALLOWED',
|
|
37
|
+
WORKER_NOT_ALLOWED: 'WORKER_NOT_ALLOWED',
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=codes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codes.js","sourceRoot":"","sources":["../../src/errors/codes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,aAAa,EAAE,eAAe;IAC9B,eAAe,EAAE,iBAAiB;IAClC,iBAAiB,EAAE,mBAAmB;IACtC,eAAe,EAAE,iBAAiB;IAClC,eAAe,EAAE,iBAAiB;IAClC,qBAAqB,EAAE,uBAAuB;IAC9C,YAAY,EAAE,cAAc;IAC5B,gBAAgB,EAAE,kBAAkB;IACpC,aAAa,EAAE,eAAe;IAE9B,eAAe,EAAE,iBAAiB;IAClC,oBAAoB,EAAE,sBAAsB;IAC5C,0BAA0B,EAAE,4BAA4B;IACxD,oBAAoB,EAAE,sBAAsB;IAC5C,kBAAkB,EAAE,oBAAoB;IACxC,uBAAuB,EAAE,yBAAyB;IAClD,wBAAwB,EAAE,0BAA0B;IACpD,sBAAsB,EAAE,wBAAwB;IAEhD,sBAAsB,EAAE,wBAAwB;IAChD,oBAAoB,EAAE,sBAAsB;IAC5C,0BAA0B,EAAE,4BAA4B;IAExD,iBAAiB,EAAE,mBAAmB;IACtC,mBAAmB,EAAE,qBAAqB;IAC1C,wBAAwB,EAAE,0BAA0B;IACpD,iBAAiB,EAAE,mBAAmB;IAEtC,kBAAkB,EAAE,oBAAoB;IAExC,gBAAgB,EAAE,kBAAkB;IACpC,mBAAmB,EAAE,qBAAqB;IAC1C,qBAAqB,EAAE,uBAAuB;IAC9C,iBAAiB,EAAE,mBAAmB;IACtC,cAAc,EAAE,gBAAgB;IAEhC,mBAAmB,EAAE,qBAAqB;IAC1C,kBAAkB,EAAE,oBAAoB;CAChC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-error.d.ts","sourceRoot":"","sources":["../../src/errors/config-error.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,qBAAa,WAAY,SAAQ,YAAY;IAC3C,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;gBAEf,OAAO,EAAE,MAAM,EAAE;IAUpB,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAM3C"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LicenseErrorCode } from './codes.js';
|
|
2
|
+
import { LicenseError } from './license-error.js';
|
|
3
|
+
export class ConfigError extends LicenseError {
|
|
4
|
+
missing;
|
|
5
|
+
constructor(missing) {
|
|
6
|
+
super(`Missing required environment variables: ${missing.join(', ')}`, {
|
|
7
|
+
code: LicenseErrorCode.CONFIG_MISSING_ENV,
|
|
8
|
+
status: 'invalid',
|
|
9
|
+
source: 'load-options-from-env',
|
|
10
|
+
});
|
|
11
|
+
this.name = 'ConfigError';
|
|
12
|
+
this.missing = missing;
|
|
13
|
+
}
|
|
14
|
+
toJSON() {
|
|
15
|
+
return {
|
|
16
|
+
...super.toJSON(),
|
|
17
|
+
missing: this.missing,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=config-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-error.js","sourceRoot":"","sources":["../../src/errors/config-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,OAAO,WAAY,SAAQ,YAAY;IAClC,OAAO,CAAW;IAE3B,YAAY,OAAiB;QAC3B,KAAK,CAAC,2CAA2C,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;YACrE,IAAI,EAAE,gBAAgB,CAAC,kBAAkB;YACzC,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,uBAAuB;SAChC,CAAC,CAAC;QACH,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;QAC1B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAEQ,MAAM;QACb,OAAO;YACL,GAAG,KAAK,CAAC,MAAM,EAAE;YACjB,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LicenseError } from './license-error.js';
|
|
2
2
|
export declare class FeatureDisabledError extends LicenseError {
|
|
3
3
|
readonly feature: string;
|
|
4
|
-
constructor(feature: string, message?: string);
|
|
4
|
+
constructor(feature: string, message?: string, source?: string);
|
|
5
|
+
toJSON(): Record<string, unknown>;
|
|
5
6
|
}
|
|
6
7
|
//# sourceMappingURL=feature-error.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-error.d.ts","sourceRoot":"","sources":["../../src/errors/feature-error.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"feature-error.d.ts","sourceRoot":"","sources":["../../src/errors/feature-error.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,qBAAa,oBAAqB,SAAQ,YAAY;IACpD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;gBAEb,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;IAUrD,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAM3C"}
|
|
@@ -1,10 +1,21 @@
|
|
|
1
|
+
import { LicenseErrorCode } from './codes.js';
|
|
1
2
|
import { LicenseError } from './license-error.js';
|
|
2
3
|
export class FeatureDisabledError extends LicenseError {
|
|
3
4
|
feature;
|
|
4
|
-
constructor(feature, message) {
|
|
5
|
-
super(message ?? `Feature "${feature}" is not available for your license`,
|
|
5
|
+
constructor(feature, message, source) {
|
|
6
|
+
super(message ?? `Feature "${feature}" is not available for your license`, {
|
|
7
|
+
code: LicenseErrorCode.FEATURE_DISABLED,
|
|
8
|
+
status: 'limited',
|
|
9
|
+
source: source ?? 'feature-guard.assertFeatureEnabled',
|
|
10
|
+
});
|
|
6
11
|
this.name = 'FeatureDisabledError';
|
|
7
12
|
this.feature = feature;
|
|
8
13
|
}
|
|
14
|
+
toJSON() {
|
|
15
|
+
return {
|
|
16
|
+
...super.toJSON(),
|
|
17
|
+
feature: this.feature,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
9
20
|
}
|
|
10
21
|
//# sourceMappingURL=feature-error.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-error.js","sourceRoot":"","sources":["../../src/errors/feature-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,OAAO,oBAAqB,SAAQ,YAAY;IAC3C,OAAO,CAAS;IAEzB,YAAY,OAAe,EAAE,OAAgB;
|
|
1
|
+
{"version":3,"file":"feature-error.js","sourceRoot":"","sources":["../../src/errors/feature-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,OAAO,oBAAqB,SAAQ,YAAY;IAC3C,OAAO,CAAS;IAEzB,YAAY,OAAe,EAAE,OAAgB,EAAE,MAAe;QAC5D,KAAK,CAAC,OAAO,IAAI,YAAY,OAAO,qCAAqC,EAAE;YACzE,IAAI,EAAE,gBAAgB,CAAC,gBAAgB;YACvC,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,MAAM,IAAI,oCAAoC;SACvD,CAAC,CAAC;QACH,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAEQ,MAAM;QACb,OAAO;YACL,GAAG,KAAK,CAAC,MAAM,EAAE;YACjB,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC;IACJ,CAAC;CACF"}
|
package/dist/errors/index.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
export * from './codes.js';
|
|
1
2
|
export * from './license-error.js';
|
|
2
3
|
export * from './feature-error.js';
|
|
3
4
|
export * from './quota-error.js';
|
|
4
5
|
export * from './policy-error.js';
|
|
6
|
+
export * from './module-error.js';
|
|
7
|
+
export * from './api-error.js';
|
|
8
|
+
export * from './config-error.js';
|
|
9
|
+
export * from './runtime-error.js';
|
|
10
|
+
export * from './throw-for-status.js';
|
|
5
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC"}
|
package/dist/errors/index.js
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
export * from './codes.js';
|
|
1
2
|
export * from './license-error.js';
|
|
2
3
|
export * from './feature-error.js';
|
|
3
4
|
export * from './quota-error.js';
|
|
4
5
|
export * from './policy-error.js';
|
|
6
|
+
export * from './module-error.js';
|
|
7
|
+
export * from './api-error.js';
|
|
8
|
+
export * from './config-error.js';
|
|
9
|
+
export * from './runtime-error.js';
|
|
10
|
+
export * from './throw-for-status.js';
|
|
5
11
|
//# sourceMappingURL=index.js.map
|
package/dist/errors/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC"}
|
|
@@ -1,22 +1,63 @@
|
|
|
1
1
|
import type { LicenseStatusValue } from '../types/status.js';
|
|
2
|
+
import { type LicenseErrorCodeValue } from './codes.js';
|
|
3
|
+
export interface LicenseErrorOptions {
|
|
4
|
+
code?: LicenseErrorCodeValue;
|
|
5
|
+
status?: LicenseStatusValue;
|
|
6
|
+
source?: string;
|
|
7
|
+
cause?: unknown;
|
|
8
|
+
/** When true, callers may fall back (e.g. offline cache) instead of failing immediately. */
|
|
9
|
+
retryable?: boolean;
|
|
10
|
+
}
|
|
2
11
|
export declare class LicenseError extends Error {
|
|
3
|
-
readonly code:
|
|
12
|
+
readonly code: LicenseErrorCodeValue;
|
|
4
13
|
readonly status?: LicenseStatusValue;
|
|
5
|
-
|
|
14
|
+
readonly source?: string;
|
|
15
|
+
readonly retryable: boolean;
|
|
16
|
+
readonly cause?: unknown;
|
|
17
|
+
constructor(message: string, options?: LicenseErrorOptions);
|
|
18
|
+
toJSON(): Record<string, unknown>;
|
|
19
|
+
/** Payload for HTTP 403 / API error responses (no internal fields). */
|
|
20
|
+
toClientPayload(): {
|
|
21
|
+
code: string;
|
|
22
|
+
message: string;
|
|
23
|
+
status?: LicenseStatusValue;
|
|
24
|
+
source?: string;
|
|
25
|
+
};
|
|
6
26
|
}
|
|
7
27
|
export declare class LicenseRevokedError extends LicenseError {
|
|
8
|
-
constructor(message?: string);
|
|
28
|
+
constructor(message?: string, source?: string);
|
|
9
29
|
}
|
|
10
30
|
export declare class LicenseSuspendedError extends LicenseError {
|
|
11
|
-
constructor(message?: string);
|
|
31
|
+
constructor(message?: string, source?: string);
|
|
12
32
|
}
|
|
13
33
|
export declare class LicenseExpiredError extends LicenseError {
|
|
14
|
-
constructor(message?: string);
|
|
34
|
+
constructor(message?: string, source?: string);
|
|
35
|
+
}
|
|
36
|
+
export interface LicenseInvalidErrorOptions {
|
|
37
|
+
code?: LicenseErrorCodeValue;
|
|
38
|
+
source?: string;
|
|
39
|
+
cause?: unknown;
|
|
15
40
|
}
|
|
16
41
|
export declare class LicenseInvalidError extends LicenseError {
|
|
17
|
-
constructor(message?: string);
|
|
42
|
+
constructor(message?: string, options?: LicenseInvalidErrorOptions);
|
|
18
43
|
}
|
|
19
44
|
export declare class OfflineGraceExpiredError extends LicenseError {
|
|
20
|
-
constructor(message?: string);
|
|
45
|
+
constructor(message?: string, source?: string);
|
|
46
|
+
}
|
|
47
|
+
export declare class LicenseRateLimitError extends LicenseError {
|
|
48
|
+
constructor(message?: string, source?: string);
|
|
49
|
+
}
|
|
50
|
+
export declare class InstanceBlockedError extends LicenseError {
|
|
51
|
+
constructor(message?: string, source?: string);
|
|
52
|
+
}
|
|
53
|
+
export declare class MaxInstancesError extends LicenseError {
|
|
54
|
+
constructor(message?: string, source?: string);
|
|
21
55
|
}
|
|
56
|
+
export declare function isLicenseError(error: unknown): error is LicenseError;
|
|
57
|
+
export declare function formatLicenseError(error: unknown): {
|
|
58
|
+
code: string;
|
|
59
|
+
message: string;
|
|
60
|
+
source?: string;
|
|
61
|
+
status?: LicenseStatusValue;
|
|
62
|
+
};
|
|
22
63
|
//# sourceMappingURL=license-error.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"license-error.d.ts","sourceRoot":"","sources":["../../src/errors/license-error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{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,EAAE,MAAM;CAQ7D;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,CAAC,EAAE,qBAAqB,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,qBAAa,mBAAoB,SAAQ,YAAY;gBACvC,OAAO,SAAuB,EAAE,OAAO,CAAC,EAAE,0BAA0B;CASjF;AAED,qBAAa,wBAAyB,SAAQ,YAAY;gBAC5C,OAAO,SAAqC,EAAE,MAAM,CAAC,EAAE,MAAM;CAQ1E;AAED,qBAAa,qBAAsB,SAAQ,YAAY;gBACzC,OAAO,SAAoC,EAAE,MAAM,CAAC,EAAE,MAAM;CASzE;AAED,qBAAa,oBAAqB,SAAQ,YAAY;gBACxC,OAAO,SAAwB,EAAE,MAAM,CAAC,EAAE,MAAM;CAQ7D;AAED,qBAAa,iBAAkB,SAAQ,YAAY;gBACrC,OAAO,SAA8B,EAAE,MAAM,CAAC,EAAE,MAAM;CAQnE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAEpE;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B,CASA"}
|
|
@@ -1,41 +1,131 @@
|
|
|
1
|
+
import { LicenseErrorCode } from './codes.js';
|
|
1
2
|
export class LicenseError extends Error {
|
|
2
3
|
code;
|
|
3
4
|
status;
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
source;
|
|
6
|
+
retryable;
|
|
7
|
+
cause;
|
|
8
|
+
constructor(message, options = {}) {
|
|
9
|
+
super(message, options.cause !== undefined ? { cause: options.cause } : undefined);
|
|
6
10
|
this.name = 'LicenseError';
|
|
7
|
-
this.code = code;
|
|
8
|
-
this.status = status;
|
|
11
|
+
this.code = options.code ?? LicenseErrorCode.LICENSE_ERROR;
|
|
12
|
+
this.status = options.status;
|
|
13
|
+
this.source = options.source;
|
|
14
|
+
this.cause = options.cause;
|
|
15
|
+
this.retryable = options.retryable ?? false;
|
|
16
|
+
}
|
|
17
|
+
toJSON() {
|
|
18
|
+
return {
|
|
19
|
+
name: this.name,
|
|
20
|
+
code: this.code,
|
|
21
|
+
message: this.message,
|
|
22
|
+
status: this.status,
|
|
23
|
+
source: this.source,
|
|
24
|
+
retryable: this.retryable,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/** Payload for HTTP 403 / API error responses (no internal fields). */
|
|
28
|
+
toClientPayload() {
|
|
29
|
+
return {
|
|
30
|
+
code: this.code,
|
|
31
|
+
message: this.message,
|
|
32
|
+
status: this.status,
|
|
33
|
+
source: this.source,
|
|
34
|
+
};
|
|
9
35
|
}
|
|
10
36
|
}
|
|
11
37
|
export class LicenseRevokedError extends LicenseError {
|
|
12
|
-
constructor(message = 'License has been revoked') {
|
|
13
|
-
super(message,
|
|
38
|
+
constructor(message = 'License has been revoked', source) {
|
|
39
|
+
super(message, {
|
|
40
|
+
code: LicenseErrorCode.LICENSE_REVOKED,
|
|
41
|
+
status: 'revoked',
|
|
42
|
+
source,
|
|
43
|
+
});
|
|
14
44
|
this.name = 'LicenseRevokedError';
|
|
15
45
|
}
|
|
16
46
|
}
|
|
17
47
|
export class LicenseSuspendedError extends LicenseError {
|
|
18
|
-
constructor(message = 'License has been suspended') {
|
|
19
|
-
super(message,
|
|
48
|
+
constructor(message = 'License has been suspended', source) {
|
|
49
|
+
super(message, {
|
|
50
|
+
code: LicenseErrorCode.LICENSE_SUSPENDED,
|
|
51
|
+
status: 'suspended',
|
|
52
|
+
source,
|
|
53
|
+
});
|
|
20
54
|
this.name = 'LicenseSuspendedError';
|
|
21
55
|
}
|
|
22
56
|
}
|
|
23
57
|
export class LicenseExpiredError extends LicenseError {
|
|
24
|
-
constructor(message = 'License has expired') {
|
|
25
|
-
super(message,
|
|
58
|
+
constructor(message = 'License has expired', source) {
|
|
59
|
+
super(message, {
|
|
60
|
+
code: LicenseErrorCode.LICENSE_EXPIRED,
|
|
61
|
+
status: 'expired',
|
|
62
|
+
source,
|
|
63
|
+
});
|
|
26
64
|
this.name = 'LicenseExpiredError';
|
|
27
65
|
}
|
|
28
66
|
}
|
|
29
67
|
export class LicenseInvalidError extends LicenseError {
|
|
30
|
-
constructor(message = 'License is invalid') {
|
|
31
|
-
super(message,
|
|
68
|
+
constructor(message = 'License is invalid', options) {
|
|
69
|
+
super(message, {
|
|
70
|
+
code: options?.code ?? LicenseErrorCode.LICENSE_INVALID,
|
|
71
|
+
status: 'invalid',
|
|
72
|
+
source: options?.source,
|
|
73
|
+
cause: options?.cause,
|
|
74
|
+
});
|
|
32
75
|
this.name = 'LicenseInvalidError';
|
|
33
76
|
}
|
|
34
77
|
}
|
|
35
78
|
export class OfflineGraceExpiredError extends LicenseError {
|
|
36
|
-
constructor(message = 'Offline grace period has expired') {
|
|
37
|
-
super(message,
|
|
79
|
+
constructor(message = 'Offline grace period has expired', source) {
|
|
80
|
+
super(message, {
|
|
81
|
+
code: LicenseErrorCode.OFFLINE_GRACE_EXPIRED,
|
|
82
|
+
status: 'grace_expired',
|
|
83
|
+
source,
|
|
84
|
+
});
|
|
38
85
|
this.name = 'OfflineGraceExpiredError';
|
|
39
86
|
}
|
|
40
87
|
}
|
|
88
|
+
export class LicenseRateLimitError extends LicenseError {
|
|
89
|
+
constructor(message = 'License API rate limit exceeded', source) {
|
|
90
|
+
super(message, {
|
|
91
|
+
code: LicenseErrorCode.RATE_LIMITED,
|
|
92
|
+
status: 'invalid',
|
|
93
|
+
source: source ?? 'license-api-client.post',
|
|
94
|
+
retryable: true,
|
|
95
|
+
});
|
|
96
|
+
this.name = 'LicenseRateLimitError';
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
export class InstanceBlockedError extends LicenseError {
|
|
100
|
+
constructor(message = 'Instance is blocked', source) {
|
|
101
|
+
super(message, {
|
|
102
|
+
code: LicenseErrorCode.INSTANCE_BLOCKED,
|
|
103
|
+
status: 'invalid',
|
|
104
|
+
source,
|
|
105
|
+
});
|
|
106
|
+
this.name = 'InstanceBlockedError';
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
export class MaxInstancesError extends LicenseError {
|
|
110
|
+
constructor(message = 'Maximum instances reached', source) {
|
|
111
|
+
super(message, {
|
|
112
|
+
code: LicenseErrorCode.MAX_INSTANCES,
|
|
113
|
+
status: 'invalid',
|
|
114
|
+
source,
|
|
115
|
+
});
|
|
116
|
+
this.name = 'MaxInstancesError';
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
export function isLicenseError(error) {
|
|
120
|
+
return error instanceof LicenseError;
|
|
121
|
+
}
|
|
122
|
+
export function formatLicenseError(error) {
|
|
123
|
+
if (error instanceof LicenseError) {
|
|
124
|
+
return error.toClientPayload();
|
|
125
|
+
}
|
|
126
|
+
return {
|
|
127
|
+
code: 'UNKNOWN_ERROR',
|
|
128
|
+
message: error instanceof Error ? error.message : String(error),
|
|
129
|
+
};
|
|
130
|
+
}
|
|
41
131
|
//# sourceMappingURL=license-error.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"license-error.js","sourceRoot":"","sources":["../../src/errors/license-error.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"license-error.js","sourceRoot":"","sources":["../../src/errors/license-error.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAA8B,MAAM,YAAY,CAAC;AAW1E,MAAM,OAAO,YAAa,SAAQ,KAAK;IAC5B,IAAI,CAAwB;IAC5B,MAAM,CAAsB;IAC5B,MAAM,CAAU;IAChB,SAAS,CAAU;IACV,KAAK,CAAW;IAElC,YAAY,OAAe,EAAE,UAA+B,EAAE;QAC5D,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC,CA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I,EAAE,gBAAgB,CAAC,YAAY;YACnC,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,MAAM,IAAI,yBAAyB;YAC3C,SAAS,EAAE,IAAI;SAChB,CAAC,CAAC;QACH,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;IACtC,CAAC;CACF;AAED,MAAM,OAAO,oBAAqB,SAAQ,YAAY;IACpD,YAAY,OAAO,GAAG,qBAAqB,EAAE,MAAe;QAC1D,KAAK,CAAC,OAAO,EAAE;YACb,IAAI,EAAE,gBAAgB,CAAC,gBAAgB;YACvC,MAAM,EAAE,SAAS;YACjB,MAAM;SACP,CAAC,CAAC;QACH,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED,MAAM,OAAO,iBAAkB,SAAQ,YAAY;IACjD,YAAY,OAAO,GAAG,2BAA2B,EAAE,MAAe;QAChE,KAAK,CAAC,OAAO,EAAE;YACb,IAAI,EAAE,gBAAgB,CAAC,aAAa;YACpC,MAAM,EAAE,SAAS;YACjB,MAAM;SACP,CAAC,CAAC;QACH,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAClC,CAAC;CACF;AAED,MAAM,UAAU,cAAc,CAAC,KAAc;IAC3C,OAAO,KAAK,YAAY,YAAY,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAM/C,IAAI,KAAK,YAAY,YAAY,EAAE,CAAC;QAClC,OAAO,KAAK,CAAC,eAAe,EAAE,CAAC;IACjC,CAAC;IAED,OAAO;QACL,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;KAChE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LicenseError } from './license-error.js';
|
|
2
|
+
export declare class ModuleNotLicensedError extends LicenseError {
|
|
3
|
+
readonly moduleName: string;
|
|
4
|
+
constructor(moduleName: string, message?: string, source?: string);
|
|
5
|
+
toJSON(): Record<string, unknown>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=module-error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-error.d.ts","sourceRoot":"","sources":["../../src/errors/module-error.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,qBAAa,sBAAuB,SAAQ,YAAY;IACtD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;gBAEhB,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;IASxD,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAM3C"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { LicenseErrorCode } from './codes.js';
|
|
2
|
+
import { LicenseError } from './license-error.js';
|
|
3
|
+
export class ModuleNotLicensedError extends LicenseError {
|
|
4
|
+
moduleName;
|
|
5
|
+
constructor(moduleName, message, source) {
|
|
6
|
+
super(message ?? `Module "${moduleName}" is not available for your license`, {
|
|
7
|
+
code: LicenseErrorCode.MODULE_NOT_LICENSED,
|
|
8
|
+
source: source ?? 'licensed-module-registry',
|
|
9
|
+
});
|
|
10
|
+
this.name = 'ModuleNotLicensedError';
|
|
11
|
+
this.moduleName = moduleName;
|
|
12
|
+
}
|
|
13
|
+
toJSON() {
|
|
14
|
+
return {
|
|
15
|
+
...super.toJSON(),
|
|
16
|
+
moduleName: this.moduleName,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=module-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-error.js","sourceRoot":"","sources":["../../src/errors/module-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,OAAO,sBAAuB,SAAQ,YAAY;IAC7C,UAAU,CAAS;IAE5B,YAAY,UAAkB,EAAE,OAAgB,EAAE,MAAe;QAC/D,KAAK,CAAC,OAAO,IAAI,WAAW,UAAU,qCAAqC,EAAE;YAC3E,IAAI,EAAE,gBAAgB,CAAC,mBAAmB;YAC1C,MAAM,EAAE,MAAM,IAAI,0BAA0B;SAC7C,CAAC,CAAC;QACH,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;QACrC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAEQ,MAAM;QACb,OAAO;YACL,GAAG,KAAK,CAAC,MAAM,EAAE;YACjB,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
import { type LicenseErrorCodeValue } from './codes.js';
|
|
1
2
|
import { LicenseError } from './license-error.js';
|
|
3
|
+
export interface PolicySignatureErrorOptions {
|
|
4
|
+
code?: LicenseErrorCodeValue;
|
|
5
|
+
source?: string;
|
|
6
|
+
field?: string;
|
|
7
|
+
cause?: unknown;
|
|
8
|
+
}
|
|
2
9
|
export declare class PolicySignatureError extends LicenseError {
|
|
3
|
-
|
|
10
|
+
readonly field?: string;
|
|
11
|
+
constructor(message?: string, options?: PolicySignatureErrorOptions);
|
|
12
|
+
toJSON(): Record<string, unknown>;
|
|
4
13
|
}
|
|
5
14
|
//# sourceMappingURL=policy-error.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policy-error.d.ts","sourceRoot":"","sources":["../../src/errors/policy-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,qBAAa,oBAAqB,SAAQ,YAAY;
|
|
1
|
+
{"version":3,"file":"policy-error.d.ts","sourceRoot":"","sources":["../../src/errors/policy-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,WAAW,2BAA2B;IAC1C,IAAI,CAAC,EAAE,qBAAqB,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,qBAAa,oBAAqB,SAAQ,YAAY;IACpD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;gBAGtB,OAAO,SAA+C,EACtD,OAAO,GAAE,2BAAgC;IAYlC,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAM3C"}
|
|
@@ -1,8 +1,22 @@
|
|
|
1
|
+
import { LicenseErrorCode } from './codes.js';
|
|
1
2
|
import { LicenseError } from './license-error.js';
|
|
2
3
|
export class PolicySignatureError extends LicenseError {
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
field;
|
|
5
|
+
constructor(message = 'Policy token signature verification failed', options = {}) {
|
|
6
|
+
super(message, {
|
|
7
|
+
code: options.code ?? LicenseErrorCode.POLICY_SIGNATURE_ERROR,
|
|
8
|
+
status: 'invalid',
|
|
9
|
+
source: options.source ?? 'verify-policy-token',
|
|
10
|
+
cause: options.cause,
|
|
11
|
+
});
|
|
5
12
|
this.name = 'PolicySignatureError';
|
|
13
|
+
this.field = options.field;
|
|
14
|
+
}
|
|
15
|
+
toJSON() {
|
|
16
|
+
return {
|
|
17
|
+
...super.toJSON(),
|
|
18
|
+
field: this.field,
|
|
19
|
+
};
|
|
6
20
|
}
|
|
7
21
|
}
|
|
8
22
|
//# sourceMappingURL=policy-error.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policy-error.js","sourceRoot":"","sources":["../../src/errors/policy-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"policy-error.js","sourceRoot":"","sources":["../../src/errors/policy-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAA8B,MAAM,YAAY,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AASlD,MAAM,OAAO,oBAAqB,SAAQ,YAAY;IAC3C,KAAK,CAAU;IAExB,YACE,OAAO,GAAG,4CAA4C,EACtD,UAAuC,EAAE;QAEzC,KAAK,CAAC,OAAO,EAAE;YACb,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,gBAAgB,CAAC,sBAAsB;YAC7D,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,qBAAqB;YAC/C,KAAK,EAAE,OAAO,CAAC,KAAK;SACrB,CAAC,CAAC;QACH,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;QACnC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;IAC7B,CAAC;IAEQ,MAAM;QACb,OAAO;YACL,GAAG,KAAK,CAAC,MAAM,EAAE;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC;IACJ,CAAC;CACF"}
|