@webpieces/core-util 0.4.759 → 0.4.761

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.
Files changed (56) hide show
  1. package/package.json +1 -1
  2. package/src/ContextKey.d.ts +3 -3
  3. package/src/ContextKey.js +3 -3
  4. package/src/ContextKey.js.map +1 -1
  5. package/src/http/ContextMgr.d.ts +2 -2
  6. package/src/http/ContextMgr.js +2 -2
  7. package/src/http/ContextMgr.js.map +1 -1
  8. package/src/http/DestinationTrust.d.ts +5 -5
  9. package/src/http/DestinationTrust.js +8 -8
  10. package/src/http/DestinationTrust.js.map +1 -1
  11. package/src/http/RouteMetadata.d.ts +1 -1
  12. package/src/http/RouteMetadata.js +1 -1
  13. package/src/http/RouteMetadata.js.map +1 -1
  14. package/src/http/RuntimeLocality.d.ts +3 -3
  15. package/src/http/RuntimeLocality.js +1 -1
  16. package/src/http/RuntimeLocality.js.map +1 -1
  17. package/src/http/Secrets.d.ts +2 -2
  18. package/src/http/Secrets.js +2 -2
  19. package/src/http/Secrets.js.map +1 -1
  20. package/src/http/WebpiecesCoreHeaders.d.ts +2 -2
  21. package/src/http/WebpiecesCoreHeaders.js +22 -7
  22. package/src/http/WebpiecesCoreHeaders.js.map +1 -1
  23. package/src/http/{AuthApiKeyCompileAssertions.d.ts → WpAuthApiKeyCompileAssertions.d.ts} +4 -4
  24. package/src/http/{AuthApiKeyCompileAssertions.js → WpAuthApiKeyCompileAssertions.js} +25 -11
  25. package/src/http/WpAuthApiKeyCompileAssertions.js.map +1 -0
  26. package/src/http/{AuthJwtCompileAssertions.d.ts → WpAuthJwtCompileAssertions.d.ts} +2 -0
  27. package/src/http/{AuthJwtCompileAssertions.js → WpAuthJwtCompileAssertions.js} +19 -12
  28. package/src/http/WpAuthJwtCompileAssertions.js.map +1 -0
  29. package/src/http/auth-mode.d.ts +8 -8
  30. package/src/http/auth-mode.js +1 -1
  31. package/src/http/auth-mode.js.map +1 -1
  32. package/src/http/decorators.d.ts +47 -44
  33. package/src/http/decorators.js +95 -81
  34. package/src/http/decorators.js.map +1 -1
  35. package/src/index.d.ts +3 -1
  36. package/src/index.js +23 -12
  37. package/src/index.js.map +1 -1
  38. package/src/ipc/IpcDecorators.d.ts +23 -0
  39. package/src/ipc/IpcDecorators.js +104 -0
  40. package/src/ipc/IpcDecorators.js.map +1 -0
  41. package/src/ipc/IpcIdentity.d.ts +3 -0
  42. package/src/ipc/IpcIdentity.js +14 -0
  43. package/src/ipc/IpcIdentity.js.map +1 -0
  44. package/src/ipc/IpcProtocol.js +6 -6
  45. package/src/ipc/IpcProtocol.js.map +1 -1
  46. package/src/ipc/index.d.ts +4 -2
  47. package/src/ipc/index.js +16 -5
  48. package/src/ipc/index.js.map +1 -1
  49. package/src/http/AuthApiKeyCompileAssertions.js.map +0 -1
  50. package/src/http/AuthJwtCompileAssertions.js.map +0 -1
  51. package/src/ipc/IpcCompileAssertions.d.ts +0 -4
  52. package/src/ipc/IpcCompileAssertions.js +0 -39
  53. package/src/ipc/IpcCompileAssertions.js.map +0 -1
  54. package/src/ipc/IpcContract.d.ts +0 -32
  55. package/src/ipc/IpcContract.js +0 -65
  56. package/src/ipc/IpcContract.js.map +0 -1
package/src/index.d.ts CHANGED
@@ -17,7 +17,9 @@ export { ConsoleLogger } from './logging/ConsoleLogger';
17
17
  export { ConsoleLoggerFactory } from './logging/ConsoleLoggerFactory';
18
18
  export { LogManager } from './logging/LogManager';
19
19
  export { LogChunker, LogChunkerImpl, LogChunkInfo, MAX_GCP_LOG_BYTES, GCP_LOG_BUDGET_BYTES, } from './logging/LogChunker';
20
- export { ApiPath, Endpoint, Public, AuthJwt, rolesRequired, MISSING_AUTH_DECORATOR_FIX, AuthOidc, AuthSharedSecret, AuthWebhook, AuthApiKey, AuthLocalOnly, MaskLog, getApiPath, getEndpoints, getEndpointOptions, getEndpointKind, getEndpointKinds, getMaskSpec, isFormPost, isRawBody, isApiPath, getAuthMeta, getAuthMode, assertEveryEndpointHasAuthMode, assertEveryExternalEndpointDeclaresCaller, assertEveryWebhookEndpointRetainsRawBody, validateNoConflictingDecorators, METADATA_KEYS, } from './http/decorators';
20
+ export { ApiPath, Endpoint, WpAuthPublic, WpAuthJwt, rolesRequired, MISSING_AUTH_DECORATOR_FIX, WpAuthOidc, WpAuthSharedSecret, WpAuthWebhook, WpAuthApiKey, WpAuthLocalOnly, MaskLog, getApiPath, getEndpoints, getEndpointOptions, getEndpointKind, getEndpointKinds, getMaskSpec, isFormPost, isRawBody, isApiPath, getAuthMeta, getAuthMode, assertEveryEndpointHasAuthMode, assertEveryExternalEndpointDeclaresCaller, assertEveryWebhookEndpointRetainsRawBody, validateNoConflictingDecorators, METADATA_KEYS, } from './http/decorators';
21
+ export { WpInternal, WpIpcEndpoint, isInternalApi, getIpcApiId, getIpcEndpoints, getIpcEndpointKind, getIpcMaskSpec, assertInternalApi, assertNotInternalApi, IPC_METADATA_KEYS, } from './ipc/IpcDecorators';
22
+ export type { IpcApiType, IpcEndpointKind, IpcEndpointOptions } from './ipc/IpcDecorators';
21
23
  export { RouteMetadata } from './http/RouteMetadata';
22
24
  export type { EndpointKind, EndpointOptions, ExternalEndpointOptions } from './http/decorators';
23
25
  export { AuthMeta } from './http/auth-mode';
package/src/index.js CHANGED
@@ -8,9 +8,9 @@
8
8
  * @packageDocumentation
9
9
  */
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.assertApiKind = exports.getApiKind = exports.ENDPOINT_KINDS_BY_API_KIND = exports.Queue = exports.PubSub = exports.Rpc = exports.AuthMeta = exports.RouteMetadata = exports.METADATA_KEYS = exports.validateNoConflictingDecorators = exports.assertEveryWebhookEndpointRetainsRawBody = exports.assertEveryExternalEndpointDeclaresCaller = exports.assertEveryEndpointHasAuthMode = exports.getAuthMode = exports.getAuthMeta = exports.isApiPath = exports.isRawBody = exports.isFormPost = exports.getMaskSpec = exports.getEndpointKinds = exports.getEndpointKind = exports.getEndpointOptions = exports.getEndpoints = exports.getApiPath = exports.MaskLog = exports.AuthLocalOnly = exports.AuthApiKey = exports.AuthWebhook = exports.AuthSharedSecret = exports.AuthOidc = exports.MISSING_AUTH_DECORATOR_FIX = exports.rolesRequired = exports.AuthJwt = exports.Public = exports.Endpoint = exports.ApiPath = exports.GCP_LOG_BUDGET_BYTES = exports.MAX_GCP_LOG_BYTES = exports.LogChunkInfo = exports.LogChunkerImpl = exports.LogChunker = exports.LogManager = exports.ConsoleLoggerFactory = exports.ConsoleLogger = exports.DESIGN_METADATA_KEYS = exports.isDocumentDesign = exports.DocumentDesign = exports.ContextTuple = exports.ContextKey = exports.toError = void 0;
12
- exports.KeyedFailureClassifier = exports.HttpResponseDto = exports.HttpResponseStatus = exports.HttpHeader = exports.RuntimeLocality = exports.ServiceInfo = exports.TimeoutError = exports.CallContext = exports.CallDeadline = exports.CallRegistry = exports.ClientRegistry = exports.HeaderRegistry = exports.DateTimeUtil = exports.TimeUtil = exports.DateUtil = exports.InstantUtil = exports.NetworkRejectClassifier = exports.NO_REG_CODE = exports.WRONG_COMPANY = exports.WRONG_DOMAIN = exports.EMAIL_NOT_CONFIRMED = exports.NOT_APPROVED = exports.WRONG_LOGIN = exports.WRONG_LOGIN_TYPE = exports.ENTITY_NOT_FOUND = exports.OfflineError = exports.HttpUserError = exports.HttpVendorError = exports.HttpTooManyRequestsError = exports.HttpInternalServerError = exports.HttpGatewayTimeoutError = exports.HttpServiceUnavailableError = exports.HttpBadGatewayError = exports.HttpTimeoutError = exports.HttpForbiddenError = exports.HttpUnauthorizedError = exports.HttpBadRequestError = exports.EndpointNotFoundError = exports.HttpNotFoundError = exports.HttpError = exports.ProtocolError = exports.SECRETS = exports.Secrets = exports.getEndpointCaller = exports.isExternalSystemKind = exports.ExternalCaller = exports.DEFAULT_CALLER_KIND = exports.EXTERNAL_SYSTEM_KINDS = exports.getQueueName = exports.assertPubSubConventions = void 0;
13
- exports.HttpErrorStatus = exports.ApiErrorPayload = exports.ApiErrorCodec = exports.VendorError = exports.UnauthorizedError = exports.BadRequestError = exports.UserError = exports.RequestTimeoutError = exports.ForbiddenError = exports.TooManyRequestsError = exports.InternalError = exports.GatewayTimeoutError = exports.ServiceUnavailableError = exports.BadGatewayError = exports.NotFoundError = exports.ApiError = exports.FilterChain = exports.Filter = exports.SerializedError = exports.SerializedMap = exports.RecordSerializer = exports.getDoNotRecordFields = exports.DoNotRecord = exports.RecordedTestCase = exports.RecordedError = exports.RecordedEndpoint = exports.RecorderKeys = exports.ApiMethodInfo = exports.LOG_API_CALL_LOGGER_NAME = exports.ApiCallLogNameImpl = exports.ApiCallLogName = exports.ApiCallInfo = exports.MaskSpec = exports.LogApiCallImpl = exports.ContextMgr = exports.DestinationTrust = exports.WebpiecesCoreHeaders = exports.templateDeriver = exports.WEBPIECES_DEFAULT_FAILURE_CLASSIFIER = exports.WebpiecesDefaultFailureClassifier = void 0;
11
+ exports.assertInternalApi = exports.getIpcMaskSpec = exports.getIpcEndpointKind = exports.getIpcEndpoints = exports.getIpcApiId = exports.isInternalApi = exports.WpIpcEndpoint = exports.WpInternal = exports.METADATA_KEYS = exports.validateNoConflictingDecorators = exports.assertEveryWebhookEndpointRetainsRawBody = exports.assertEveryExternalEndpointDeclaresCaller = exports.assertEveryEndpointHasAuthMode = exports.getAuthMode = exports.getAuthMeta = exports.isApiPath = exports.isRawBody = exports.isFormPost = exports.getMaskSpec = exports.getEndpointKinds = exports.getEndpointKind = exports.getEndpointOptions = exports.getEndpoints = exports.getApiPath = exports.MaskLog = exports.WpAuthLocalOnly = exports.WpAuthApiKey = exports.WpAuthWebhook = exports.WpAuthSharedSecret = exports.WpAuthOidc = exports.MISSING_AUTH_DECORATOR_FIX = exports.rolesRequired = exports.WpAuthJwt = exports.WpAuthPublic = exports.Endpoint = exports.ApiPath = exports.GCP_LOG_BUDGET_BYTES = exports.MAX_GCP_LOG_BYTES = exports.LogChunkInfo = exports.LogChunkerImpl = exports.LogChunker = exports.LogManager = exports.ConsoleLoggerFactory = exports.ConsoleLogger = exports.DESIGN_METADATA_KEYS = exports.isDocumentDesign = exports.DocumentDesign = exports.ContextTuple = exports.ContextKey = exports.toError = void 0;
12
+ exports.ClientRegistry = exports.HeaderRegistry = exports.DateTimeUtil = exports.TimeUtil = exports.DateUtil = exports.InstantUtil = exports.NetworkRejectClassifier = exports.NO_REG_CODE = exports.WRONG_COMPANY = exports.WRONG_DOMAIN = exports.EMAIL_NOT_CONFIRMED = exports.NOT_APPROVED = exports.WRONG_LOGIN = exports.WRONG_LOGIN_TYPE = exports.ENTITY_NOT_FOUND = exports.OfflineError = exports.HttpUserError = exports.HttpVendorError = exports.HttpTooManyRequestsError = exports.HttpInternalServerError = exports.HttpGatewayTimeoutError = exports.HttpServiceUnavailableError = exports.HttpBadGatewayError = exports.HttpTimeoutError = exports.HttpForbiddenError = exports.HttpUnauthorizedError = exports.HttpBadRequestError = exports.EndpointNotFoundError = exports.HttpNotFoundError = exports.HttpError = exports.ProtocolError = exports.SECRETS = exports.Secrets = exports.getEndpointCaller = exports.isExternalSystemKind = exports.ExternalCaller = exports.DEFAULT_CALLER_KIND = exports.EXTERNAL_SYSTEM_KINDS = exports.getQueueName = exports.assertPubSubConventions = exports.assertApiKind = exports.getApiKind = exports.ENDPOINT_KINDS_BY_API_KIND = exports.Queue = exports.PubSub = exports.Rpc = exports.AuthMeta = exports.RouteMetadata = exports.IPC_METADATA_KEYS = exports.assertNotInternalApi = void 0;
13
+ exports.HttpErrorStatus = exports.ApiErrorPayload = exports.ApiErrorCodec = exports.VendorError = exports.UnauthorizedError = exports.BadRequestError = exports.UserError = exports.RequestTimeoutError = exports.ForbiddenError = exports.TooManyRequestsError = exports.InternalError = exports.GatewayTimeoutError = exports.ServiceUnavailableError = exports.BadGatewayError = exports.NotFoundError = exports.ApiError = exports.FilterChain = exports.Filter = exports.SerializedError = exports.SerializedMap = exports.RecordSerializer = exports.getDoNotRecordFields = exports.DoNotRecord = exports.RecordedTestCase = exports.RecordedError = exports.RecordedEndpoint = exports.RecorderKeys = exports.ApiMethodInfo = exports.LOG_API_CALL_LOGGER_NAME = exports.ApiCallLogNameImpl = exports.ApiCallLogName = exports.ApiCallInfo = exports.MaskSpec = exports.LogApiCallImpl = exports.ContextMgr = exports.DestinationTrust = exports.WebpiecesCoreHeaders = exports.templateDeriver = exports.WEBPIECES_DEFAULT_FAILURE_CLASSIFIER = exports.WebpiecesDefaultFailureClassifier = exports.KeyedFailureClassifier = exports.HttpResponseDto = exports.HttpResponseStatus = exports.HttpHeader = exports.RuntimeLocality = exports.ServiceInfo = exports.TimeoutError = exports.CallContext = exports.CallDeadline = exports.CallRegistry = void 0;
14
14
  var errorUtils_1 = require("./lib/errorUtils");
15
15
  Object.defineProperty(exports, "toError", { enumerable: true, get: function () { return errorUtils_1.toError; } });
16
16
  var ContextKey_1 = require("./ContextKey");
@@ -46,15 +46,15 @@ var decorators_1 = require("./http/decorators");
46
46
  Object.defineProperty(exports, "ApiPath", { enumerable: true, get: function () { return decorators_1.ApiPath; } });
47
47
  Object.defineProperty(exports, "Endpoint", { enumerable: true, get: function () { return decorators_1.Endpoint; } });
48
48
  // Auth mode decorators (clean service-to-service + user JWT model)
49
- Object.defineProperty(exports, "Public", { enumerable: true, get: function () { return decorators_1.Public; } });
50
- Object.defineProperty(exports, "AuthJwt", { enumerable: true, get: function () { return decorators_1.AuthJwt; } });
49
+ Object.defineProperty(exports, "WpAuthPublic", { enumerable: true, get: function () { return decorators_1.WpAuthPublic; } });
50
+ Object.defineProperty(exports, "WpAuthJwt", { enumerable: true, get: function () { return decorators_1.WpAuthJwt; } });
51
51
  Object.defineProperty(exports, "rolesRequired", { enumerable: true, get: function () { return decorators_1.rolesRequired; } });
52
52
  Object.defineProperty(exports, "MISSING_AUTH_DECORATOR_FIX", { enumerable: true, get: function () { return decorators_1.MISSING_AUTH_DECORATOR_FIX; } });
53
- Object.defineProperty(exports, "AuthOidc", { enumerable: true, get: function () { return decorators_1.AuthOidc; } });
54
- Object.defineProperty(exports, "AuthSharedSecret", { enumerable: true, get: function () { return decorators_1.AuthSharedSecret; } });
55
- Object.defineProperty(exports, "AuthWebhook", { enumerable: true, get: function () { return decorators_1.AuthWebhook; } });
56
- Object.defineProperty(exports, "AuthApiKey", { enumerable: true, get: function () { return decorators_1.AuthApiKey; } });
57
- Object.defineProperty(exports, "AuthLocalOnly", { enumerable: true, get: function () { return decorators_1.AuthLocalOnly; } });
53
+ Object.defineProperty(exports, "WpAuthOidc", { enumerable: true, get: function () { return decorators_1.WpAuthOidc; } });
54
+ Object.defineProperty(exports, "WpAuthSharedSecret", { enumerable: true, get: function () { return decorators_1.WpAuthSharedSecret; } });
55
+ Object.defineProperty(exports, "WpAuthWebhook", { enumerable: true, get: function () { return decorators_1.WpAuthWebhook; } });
56
+ Object.defineProperty(exports, "WpAuthApiKey", { enumerable: true, get: function () { return decorators_1.WpAuthApiKey; } });
57
+ Object.defineProperty(exports, "WpAuthLocalOnly", { enumerable: true, get: function () { return decorators_1.WpAuthLocalOnly; } });
58
58
  Object.defineProperty(exports, "MaskLog", { enumerable: true, get: function () { return decorators_1.MaskLog; } });
59
59
  Object.defineProperty(exports, "getApiPath", { enumerable: true, get: function () { return decorators_1.getApiPath; } });
60
60
  Object.defineProperty(exports, "getEndpoints", { enumerable: true, get: function () { return decorators_1.getEndpoints; } });
@@ -72,6 +72,17 @@ Object.defineProperty(exports, "assertEveryExternalEndpointDeclaresCaller", { en
72
72
  Object.defineProperty(exports, "assertEveryWebhookEndpointRetainsRawBody", { enumerable: true, get: function () { return decorators_1.assertEveryWebhookEndpointRetainsRawBody; } });
73
73
  Object.defineProperty(exports, "validateNoConflictingDecorators", { enumerable: true, get: function () { return decorators_1.validateNoConflictingDecorators; } });
74
74
  Object.defineProperty(exports, "METADATA_KEYS", { enumerable: true, get: function () { return decorators_1.METADATA_KEYS; } });
75
+ var IpcDecorators_1 = require("./ipc/IpcDecorators");
76
+ Object.defineProperty(exports, "WpInternal", { enumerable: true, get: function () { return IpcDecorators_1.WpInternal; } });
77
+ Object.defineProperty(exports, "WpIpcEndpoint", { enumerable: true, get: function () { return IpcDecorators_1.WpIpcEndpoint; } });
78
+ Object.defineProperty(exports, "isInternalApi", { enumerable: true, get: function () { return IpcDecorators_1.isInternalApi; } });
79
+ Object.defineProperty(exports, "getIpcApiId", { enumerable: true, get: function () { return IpcDecorators_1.getIpcApiId; } });
80
+ Object.defineProperty(exports, "getIpcEndpoints", { enumerable: true, get: function () { return IpcDecorators_1.getIpcEndpoints; } });
81
+ Object.defineProperty(exports, "getIpcEndpointKind", { enumerable: true, get: function () { return IpcDecorators_1.getIpcEndpointKind; } });
82
+ Object.defineProperty(exports, "getIpcMaskSpec", { enumerable: true, get: function () { return IpcDecorators_1.getIpcMaskSpec; } });
83
+ Object.defineProperty(exports, "assertInternalApi", { enumerable: true, get: function () { return IpcDecorators_1.assertInternalApi; } });
84
+ Object.defineProperty(exports, "assertNotInternalApi", { enumerable: true, get: function () { return IpcDecorators_1.assertNotInternalApi; } });
85
+ Object.defineProperty(exports, "IPC_METADATA_KEYS", { enumerable: true, get: function () { return IpcDecorators_1.IPC_METADATA_KEYS; } });
75
86
  // The runtime representation of ONE route (split out of decorators.ts for file size only).
76
87
  var RouteMetadata_1 = require("./http/RouteMetadata");
77
88
  Object.defineProperty(exports, "RouteMetadata", { enumerable: true, get: function () { return RouteMetadata_1.RouteMetadata; } });
@@ -97,7 +108,7 @@ Object.defineProperty(exports, "DEFAULT_CALLER_KIND", { enumerable: true, get: f
97
108
  Object.defineProperty(exports, "ExternalCaller", { enumerable: true, get: function () { return external_caller_1.ExternalCaller; } });
98
109
  Object.defineProperty(exports, "isExternalSystemKind", { enumerable: true, get: function () { return external_caller_1.isExternalSystemKind; } });
99
110
  Object.defineProperty(exports, "getEndpointCaller", { enumerable: true, get: function () { return external_caller_1.getEndpointCaller; } });
100
- // Client-side shared-secret store (the value THIS service sends per @AuthSharedSecret key).
111
+ // Client-side shared-secret store (the value THIS service sends per @WpAuthSharedSecret key).
101
112
  var Secrets_1 = require("./http/Secrets");
102
113
  Object.defineProperty(exports, "Secrets", { enumerable: true, get: function () { return Secrets_1.Secrets; } });
103
114
  Object.defineProperty(exports, "SECRETS", { enumerable: true, get: function () { return Secrets_1.SECRETS; } });
@@ -154,7 +165,7 @@ Object.defineProperty(exports, "TimeoutError", { enumerable: true, get: function
154
165
  var ServiceInfo_1 = require("./http/ServiceInfo");
155
166
  Object.defineProperty(exports, "ServiceInfo", { enumerable: true, get: function () { return ServiceInfo_1.ServiceInfo; } });
156
167
  // "Where am I running" — declared once at startup (setupRuntime, from RuntimeSetupOptions.locality).
157
- // The ONE input to @AuthLocalOnly enforcement. Undeclared reads as DEPLOYED (fail safe).
168
+ // The ONE input to @WpAuthLocalOnly enforcement. Undeclared reads as DEPLOYED (fail safe).
158
169
  var RuntimeLocality_1 = require("./http/RuntimeLocality");
159
170
  Object.defineProperty(exports, "RuntimeLocality", { enumerable: true, get: function () { return RuntimeLocality_1.RuntimeLocality; } });
160
171
  // The ENTIRE HTTP response as pure data — the ONE form both transports (express, fetch) are
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/core/core-util/src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;AAEH,+CAA2C;AAAlC,qGAAA,OAAO,OAAA;AAChB,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AAOnB,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AAErB,+EAA+E;AAC/E,kFAAkF;AAClF,yCAAyC;AACzC,mDAA0F;AAAjF,gHAAA,cAAc,OAAA;AAAE,kHAAA,gBAAgB,OAAA;AAAE,sHAAA,oBAAoB,OAAA;AAO/D,yDAAwD;AAA/C,8GAAA,aAAa,OAAA;AACtB,uEAAsE;AAA7D,4HAAA,oBAAoB,OAAA;AAC7B,mDAAkD;AAAzC,wGAAA,UAAU,OAAA;AACnB,mDAM8B;AAL1B,wGAAA,UAAU,OAAA;AACV,4GAAA,cAAc,OAAA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;AACjF,qEAAkF;AAAvD,gHAAA,YAAY,OAAA;AACvC,qEAI0C;AAHtC,oHAAA,gBAAgB,OAAA;AAChB,iHAAA,aAAa,OAAA;AACb,oHAAA,gBAAgB,OAAA;AAEpB,2DAAgF;AAAvE,0GAAA,WAAW,OAAA;AAAE,mHAAA,oBAAoB,OAAA;AAC1C,qEAAoG;AAA3F,oHAAA,gBAAgB,OAAA;AAAE,iHAAA,aAAa,OAAA;AAAE,mHAAA,eAAe,OAAA;AAEzD,gGAAgG;AAChG,2EAA2E;AAC3E,+FAA+F;AAC/F,kGAAkG;AAClG,wFAAwF;AACxF,2CAA0C;AAAjC,gGAAA,MAAM,OAAA;AAEf,qDAAoD;AAA3C,0GAAA,WAAW,OAAA;AAEpB,mCAgBkB;AAfd,kGAAA,QAAQ,OAAA;AACR,uGAAA,aAAa,OAAA;AACb,yGAAA,eAAe,OAAA;AACf,iHAAA,uBAAuB,OAAA;AACvB,6GAAA,mBAAmB,OAAA;AACnB,uGAAA,aAAa,OAAA;AACb,8GAAA,oBAAoB,OAAA;AACpB,wGAAA,cAAc,OAAA;AACd,6GAAA,mBAAmB,OAAA;AACnB,mGAAA,SAAS,OAAA;AACT,yGAAA,eAAe,OAAA;AACf,2GAAA,iBAAiB,OAAA;AACjB,qGAAA,WAAW,OAAA;AACX,uGAAA,aAAa,OAAA;AACb,yGAAA,eAAe,OAAA;AAEnB,0DAAyD;AAAhD,kHAAA,eAAe,OAAA","sourcesContent":["/**\n * @webpieces/core-util\n *\n * Utility functions for WebPieces applications.\n * This package works in both browser and Node.js environments.\n *\n * @packageDocumentation\n */\n\nexport { toError } from './lib/errorUtils';\nexport { ContextKey } from './ContextKey';\nexport type {\n AnyContextKey,\n AnyTrustedContextKey,\n AnyUntrustedContextKey,\n Trust,\n} from './ContextKey';\nexport { ContextTuple } from './ContextTuple';\n\n// @DocumentDesign — DI-design-root marker. Applies to ANY project kind (server\n// controllers AND library impl classes), so it lives here (browser + Node) rather\n// than in a server-only routing package.\nexport { DocumentDesign, isDocumentDesign, DESIGN_METADATA_KEYS } from './DocumentDesign';\n\n// Logging (merged from former @webpieces/wp-logging).\n// Pluggable logging interface + a browser-safe console default; apps plug in\n// bunyan/winston/pino/etc. via LogManager.setFactory(...). Browser + Node.\nexport type { Logger, LogLevel } from './logging/Logger';\nexport type { LoggerFactory } from './logging/LoggerFactory';\nexport { ConsoleLogger } from './logging/ConsoleLogger';\nexport { ConsoleLoggerFactory } from './logging/ConsoleLoggerFactory';\nexport { LogManager } from './logging/LogManager';\nexport {\n LogChunker,\n LogChunkerImpl,\n LogChunkInfo,\n MAX_GCP_LOG_BYTES,\n GCP_LOG_BUDGET_BYTES,\n} from './logging/LogChunker';\n\n// HTTP API contract (merged from former @webpieces/http-api).\n// Shared HTTP API definition consumed by both client and server: REST\n// decorators, the HttpError hierarchy, datetime DTOs, platform-header\n// registry/readers, ValidateImplementation, and the test-case recorder\n// contract. Pure definitions — express-free, browser + Node safe.\n\n// API definition decorators\nexport {\n ApiPath,\n Endpoint,\n // Auth mode decorators (clean service-to-service + user JWT model)\n Public,\n AuthJwt,\n rolesRequired,\n MISSING_AUTH_DECORATOR_FIX,\n AuthOidc,\n AuthSharedSecret,\n AuthWebhook,\n AuthApiKey,\n AuthLocalOnly,\n MaskLog,\n getApiPath,\n getEndpoints,\n getEndpointOptions,\n getEndpointKind,\n getEndpointKinds,\n getMaskSpec,\n isFormPost,\n isRawBody,\n isApiPath,\n getAuthMeta,\n getAuthMode,\n assertEveryEndpointHasAuthMode,\n assertEveryExternalEndpointDeclaresCaller,\n assertEveryWebhookEndpointRetainsRawBody,\n validateNoConflictingDecorators,\n METADATA_KEYS,\n} from './http/decorators';\n// The runtime representation of ONE route (split out of decorators.ts for file size only).\nexport { RouteMetadata } from './http/RouteMetadata';\nexport type { EndpointKind, EndpointOptions, ExternalEndpointOptions } from './http/decorators';\n// The TYPE layer of the auth surface — likewise split out of decorators.ts for file size only.\nexport { AuthMeta } from './http/auth-mode';\nexport type {\n AuthMode,\n ApiKeyCredential,\n ApiKeyCredentials,\n JwtRoles,\n JwtRequirement,\n} from './http/auth-mode';\n// API kind (RPC vs PubSub/Cloud Tasks) + queue naming. Split out of decorators.ts for file size only;\n// one-way dependency api-kind -> decorators, and the barrel keeps the surface identical.\nexport {\n Rpc,\n PubSub,\n Queue,\n ENDPOINT_KINDS_BY_API_KIND,\n getApiKind,\n assertApiKind,\n assertPubSubConventions,\n getQueueName,\n} from './http/api-kind';\nexport type { ApiKind } from './http/api-kind';\n// WHO calls an `external` endpoint — the caller declaration @Endpoint(..., 'external', {calledBy})\n// requires, and the reader for it.\nexport {\n EXTERNAL_SYSTEM_KINDS,\n DEFAULT_CALLER_KIND,\n ExternalCaller,\n isExternalSystemKind,\n getEndpointCaller,\n} from './http/external-caller';\nexport type { ExternalSystemKind } from './http/external-caller';\n// Client-side shared-secret store (the value THIS service sends per @AuthSharedSecret key).\nexport { Secrets, SECRETS } from './http/Secrets';\n\n// Type validators\nexport { ValidateImplementation } from './http/validators';\n\n// HTTP wire DTO, legacy aliases and subtype constants.\nexport {\n ProtocolError,\n HttpError,\n HttpNotFoundError,\n EndpointNotFoundError,\n HttpBadRequestError,\n HttpUnauthorizedError,\n HttpForbiddenError,\n HttpTimeoutError,\n HttpBadGatewayError,\n HttpServiceUnavailableError,\n HttpGatewayTimeoutError,\n HttpInternalServerError,\n HttpTooManyRequestsError,\n HttpVendorError,\n HttpUserError,\n OfflineError,\n // Error subtype constants\n ENTITY_NOT_FOUND,\n WRONG_LOGIN_TYPE,\n WRONG_LOGIN,\n NOT_APPROVED,\n EMAIL_NOT_CONFIRMED,\n WRONG_DOMAIN,\n WRONG_COMPANY,\n NO_REG_CODE,\n} from './http/errors';\n\nexport { NetworkRejectClassifier } from './http/networkReject';\n\n// Date/Time DTOs and Utilities (inspired by Java Time / JSR-310)\nexport {\n InstantDto,\n DateDto,\n TimeDto,\n DateTimeDto,\n InstantUtil,\n DateUtil,\n TimeUtil,\n DateTimeUtil,\n} from './http/datetime';\n\n// Context keys + registry (the global magic-context header system)\nexport { HeaderRegistry } from './http/HeaderRegistry';\nexport { ClientRegistry } from './http/ClientRegistry';\nexport { CallRegistry } from './http/CallRegistry';\nexport { CallDeadline } from './http/CallDeadline';\nexport { CallContext } from './http/CallStrategy';\nexport type { Attempt, CallStrategy } from './http/CallStrategy';\nexport { TimeoutError } from './http/TimeoutError';\nexport type { ServiceUrlDeriver } from './http/ClientRegistry';\n\n// \"What service am I\" — set once at startup, read by the logging backends and by\n// RequestContextHeaders (to stamp requestIdSource on ids this service mints).\nexport { ServiceInfo } from './http/ServiceInfo';\n// \"Where am I running\" — declared once at startup (setupRuntime, from RuntimeSetupOptions.locality).\n// The ONE input to @AuthLocalOnly enforcement. Undeclared reads as DEPLOYED (fail safe).\nexport { RuntimeLocality } from './http/RuntimeLocality';\nexport type { Locality } from './http/RuntimeLocality';\n// The ENTIRE HTTP response as pure data — the ONE form both transports (express, fetch) are\n// normalised into, so an ErrorTranslators implementation is written once and serves both.\nexport { HttpHeader, HttpResponseStatus, HttpResponseDto } from './http/HttpResponseDto';\n// Pluggable, bidirectional error translation (app exception <-> the WHOLE response). Set on\n// ClientRegistry at startup; consulted before the built-in webpieces mapping on BOTH sides.\nexport type { ErrorTranslators } from './http/ErrorTranslators';\n// Pluggable per-client failure classification (is a thrown API-call error a real failure or an\n// expected non-failure?). Registered on ClientRegistry at startup; consulted by LogApiCall.\nexport type { FailureClassifier } from './http/FailureClassifier';\nexport { KeyedFailureClassifier } from './http/FailureClassifier';\nexport {\n WebpiecesDefaultFailureClassifier,\n WEBPIECES_DEFAULT_FAILURE_CLASSIFIER,\n} from './http/WebpiecesDefaultFailureClassifier';\nexport { templateDeriver } from './http/templateDeriver';\nexport { WebpiecesCoreHeaders } from './http/WebpiecesCoreHeaders';\nexport { ContextReader } from './http/ContextReader';\n\n// The OUTBOUND half of the trust model: whether a TRUSTED context key may ride to the endpoint being\n// called. Built ONLY from the destination endpoint's AuthMode — see the class doc.\nexport { DestinationTrust } from './http/DestinationTrust';\n\n// BROWSER-ONLY outbound-header propagation (app-held store + registry -> outbound HTTP headers).\n// Only @webpieces/http-client-browser may name it; the server reads RequestContext directly via\n// RequestContextHeaders in the Node-only @webpieces/core-context.\nexport { ContextMgr } from './http/ContextMgr';\n\n// API-call logging helper (uses LogManager above). NOT a singleton: construct one per environment\n// with that environment's ApiCallContext — `new LogApiCallImpl(new RequestContextApiCallContext())`\n// on node, `new LogApiCallImpl(new BrowserApiCallContext())` in a browser.\nexport { LogApiCallImpl } from './http/LogApiCall';\n\n// Opt-in field masking for the LogApiCall log path — declare per-api sensitive fields so secrets\n// (OAuth refresh tokens, id-token JWTs) are masked in the logs while the real value stays on the wire.\nexport { MaskSpec } from './http/LogFieldMask';\nexport type { MaskMode } from './http/LogFieldMask';\n\n// The structured `api` tag + the context-writer seam LogApiCall stamps through. The Node\n// RequestContext-backed impl lives in @webpieces/core-context, the browser one in\n// @webpieces/http-client-browser; each is CONSTRUCTED by its package, never installed globally.\nexport { ApiCallInfo } from './http/ApiCallInfo';\nexport type { ApiType, ApiResult } from './http/ApiCallInfo';\n// Console-render bridge: turns LogApiCall's [LogApiCall] bracket into [API.{side}.{phase}] locally.\nexport {\n ApiCallLogName,\n ApiCallLogNameImpl,\n LOG_API_CALL_LOGGER_NAME,\n} from './http/ApiCallLogName';\nexport { ApiMethodInfo } from './http/ApiMethodInfo';\nexport type { ApiSide } from './http/ApiMethodInfo';\nexport type { ApiCallContext } from './http/ApiCallContext';\n\n// Test-case recording contract (impl lives in http-server; hooks in http-client)\nexport { TestCaseRecorder, RecorderKeys } from './http/recorder/TestCaseRecorder';\nexport {\n RecordedEndpoint,\n RecordedError,\n RecordedTestCase,\n} from './http/recorder/RecordedEndpoint';\nexport { DoNotRecord, getDoNotRecordFields } from './http/recorder/DoNotRecord';\nexport { RecordSerializer, SerializedMap, SerializedError } from './http/recorder/RecordSerializer';\n\n// ---------------------------------------------------------------------------------------------\n// Filter-chain primitives, shared by BOTH chains: the inbound server chain\n// (`Filter<MethodMeta, WpResponse<unknown>>`, @webpieces/http-routing) and the outbound client\n// chain (`Filter<ClientRequest, Response>`, @webpieces/http-client-core). Declared once, here, in\n// the package both depend on — see the class doc for why a second pair would be a shim.\nexport { Filter } from './filters/Filter';\nexport type { Service } from './filters/Filter';\nexport { FilterChain } from './filters/FilterChain';\n\nexport {\n ApiError,\n NotFoundError,\n BadGatewayError,\n ServiceUnavailableError,\n GatewayTimeoutError,\n InternalError,\n TooManyRequestsError,\n ForbiddenError,\n RequestTimeoutError,\n UserError,\n BadRequestError,\n UnauthorizedError,\n VendorError,\n ApiErrorCodec,\n ApiErrorPayload,\n} from './errors';\nexport { HttpErrorStatus } from './http/HttpErrorStatus';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/core/core-util/src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;AAEH,+CAA2C;AAAlC,qGAAA,OAAO,OAAA;AAChB,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AAOnB,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AAErB,+EAA+E;AAC/E,kFAAkF;AAClF,yCAAyC;AACzC,mDAA0F;AAAjF,gHAAA,cAAc,OAAA;AAAE,kHAAA,gBAAgB,OAAA;AAAE,sHAAA,oBAAoB,OAAA;AAO/D,yDAAwD;AAA/C,8GAAA,aAAa,OAAA;AACtB,uEAAsE;AAA7D,4HAAA,oBAAoB,OAAA;AAC7B,mDAAkD;AAAzC,wGAAA,UAAU,OAAA;AACnB,mDAM8B;AAL1B,wGAAA,UAAU,OAAA;AACV,4GAAA,cAAc,OAAA;AACd,0GAAA,YAAY,OAAA;AACZ,+GAAA,iBAAiB,OAAA;AACjB,kHAAA,oBAAoB,OAAA;AAGxB,8DAA8D;AAC9D,sEAAsE;AACtE,sEAAsE;AACtE,uEAAuE;AACvE,kEAAkE;AAElE,4BAA4B;AAC5B,gDA8B2B;AA7BvB,qGAAA,OAAO,O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wB,OAAA;AAE5B,sDAAqD;AAA5C,8GAAA,aAAa,OAAA;AAItB,iFAAiF;AACjF,qEAAkF;AAAvD,gHAAA,YAAY,OAAA;AACvC,qEAI0C;AAHtC,oHAAA,gBAAgB,OAAA;AAChB,iHAAA,aAAa,OAAA;AACb,oHAAA,gBAAgB,OAAA;AAEpB,2DAAgF;AAAvE,0GAAA,WAAW,OAAA;AAAE,mHAAA,oBAAoB,OAAA;AAC1C,qEAAoG;AAA3F,oHAAA,gBAAgB,OAAA;AAAE,iHAAA,aAAa,OAAA;AAAE,mHAAA,eAAe,OAAA;AAEzD,gGAAgG;AAChG,2EAA2E;AAC3E,+FAA+F;AAC/F,kGAAkG;AAClG,wFAAwF;AACxF,2CAA0C;AAAjC,gGAAA,MAAM,OAAA;AAEf,qDAAoD;AAA3C,0GAAA,WAAW,OAAA;AAEpB,mCAgBkB;AAfd,kGAAA,QAAQ,OAAA;AACR,uGAAA,aAAa,OAAA;AACb,yGAAA,eAAe,OAAA;AACf,iHAAA,uBAAuB,OAAA;AACvB,6GAAA,mBAAmB,OAAA;AACnB,uGAAA,aAAa,OAAA;AACb,8GAAA,oBAAoB,OAAA;AACpB,wGAAA,cAAc,OAAA;AACd,6GAAA,mBAAmB,OAAA;AACnB,mGAAA,SAAS,OAAA;AACT,yGAAA,eAAe,OAAA;AACf,2GAAA,iBAAiB,OAAA;AACjB,qGAAA,WAAW,OAAA;AACX,uGAAA,aAAa,OAAA;AACb,yGAAA,eAAe,OAAA;AAEnB,0DAAyD;AAAhD,kHAAA,eAAe,OAAA","sourcesContent":["/**\n * @webpieces/core-util\n *\n * Utility functions for WebPieces applications.\n * This package works in both browser and Node.js environments.\n *\n * @packageDocumentation\n */\n\nexport { toError } from './lib/errorUtils';\nexport { ContextKey } from './ContextKey';\nexport type {\n AnyContextKey,\n AnyTrustedContextKey,\n AnyUntrustedContextKey,\n Trust,\n} from './ContextKey';\nexport { ContextTuple } from './ContextTuple';\n\n// @DocumentDesign — DI-design-root marker. Applies to ANY project kind (server\n// controllers AND library impl classes), so it lives here (browser + Node) rather\n// than in a server-only routing package.\nexport { DocumentDesign, isDocumentDesign, DESIGN_METADATA_KEYS } from './DocumentDesign';\n\n// Logging (merged from former @webpieces/wp-logging).\n// Pluggable logging interface + a browser-safe console default; apps plug in\n// bunyan/winston/pino/etc. via LogManager.setFactory(...). Browser + Node.\nexport type { Logger, LogLevel } from './logging/Logger';\nexport type { LoggerFactory } from './logging/LoggerFactory';\nexport { ConsoleLogger } from './logging/ConsoleLogger';\nexport { ConsoleLoggerFactory } from './logging/ConsoleLoggerFactory';\nexport { LogManager } from './logging/LogManager';\nexport {\n LogChunker,\n LogChunkerImpl,\n LogChunkInfo,\n MAX_GCP_LOG_BYTES,\n GCP_LOG_BUDGET_BYTES,\n} from './logging/LogChunker';\n\n// HTTP API contract (merged from former @webpieces/http-api).\n// Shared HTTP API definition consumed by both client and server: REST\n// decorators, the HttpError hierarchy, datetime DTOs, platform-header\n// registry/readers, ValidateImplementation, and the test-case recorder\n// contract. Pure definitions — express-free, browser + Node safe.\n\n// API definition decorators\nexport {\n ApiPath,\n Endpoint,\n // Auth mode decorators (clean service-to-service + user JWT model)\n WpAuthPublic,\n WpAuthJwt,\n rolesRequired,\n MISSING_AUTH_DECORATOR_FIX,\n WpAuthOidc,\n WpAuthSharedSecret,\n WpAuthWebhook,\n WpAuthApiKey,\n WpAuthLocalOnly,\n MaskLog,\n getApiPath,\n getEndpoints,\n getEndpointOptions,\n getEndpointKind,\n getEndpointKinds,\n getMaskSpec,\n isFormPost,\n isRawBody,\n isApiPath,\n getAuthMeta,\n getAuthMode,\n assertEveryEndpointHasAuthMode,\n assertEveryExternalEndpointDeclaresCaller,\n assertEveryWebhookEndpointRetainsRawBody,\n validateNoConflictingDecorators,\n METADATA_KEYS,\n} from './http/decorators';\nexport {\n WpInternal,\n WpIpcEndpoint,\n isInternalApi,\n getIpcApiId,\n getIpcEndpoints,\n getIpcEndpointKind,\n getIpcMaskSpec,\n assertInternalApi,\n assertNotInternalApi,\n IPC_METADATA_KEYS,\n} from './ipc/IpcDecorators';\nexport type { IpcApiType, IpcEndpointKind, IpcEndpointOptions } from './ipc/IpcDecorators';\n// The runtime representation of ONE route (split out of decorators.ts for file size only).\nexport { RouteMetadata } from './http/RouteMetadata';\nexport type { EndpointKind, EndpointOptions, ExternalEndpointOptions } from './http/decorators';\n// The TYPE layer of the auth surface — likewise split out of decorators.ts for file size only.\nexport { AuthMeta } from './http/auth-mode';\nexport type {\n AuthMode,\n ApiKeyCredential,\n ApiKeyCredentials,\n JwtRoles,\n JwtRequirement,\n} from './http/auth-mode';\n// API kind (RPC vs PubSub/Cloud Tasks) + queue naming. Split out of decorators.ts for file size only;\n// one-way dependency api-kind -> decorators, and the barrel keeps the surface identical.\nexport {\n Rpc,\n PubSub,\n Queue,\n ENDPOINT_KINDS_BY_API_KIND,\n getApiKind,\n assertApiKind,\n assertPubSubConventions,\n getQueueName,\n} from './http/api-kind';\nexport type { ApiKind } from './http/api-kind';\n// WHO calls an `external` endpoint — the caller declaration @Endpoint(..., 'external', {calledBy})\n// requires, and the reader for it.\nexport {\n EXTERNAL_SYSTEM_KINDS,\n DEFAULT_CALLER_KIND,\n ExternalCaller,\n isExternalSystemKind,\n getEndpointCaller,\n} from './http/external-caller';\nexport type { ExternalSystemKind } from './http/external-caller';\n// Client-side shared-secret store (the value THIS service sends per @WpAuthSharedSecret key).\nexport { Secrets, SECRETS } from './http/Secrets';\n\n// Type validators\nexport { ValidateImplementation } from './http/validators';\n\n// HTTP wire DTO, legacy aliases and subtype constants.\nexport {\n ProtocolError,\n HttpError,\n HttpNotFoundError,\n EndpointNotFoundError,\n HttpBadRequestError,\n HttpUnauthorizedError,\n HttpForbiddenError,\n HttpTimeoutError,\n HttpBadGatewayError,\n HttpServiceUnavailableError,\n HttpGatewayTimeoutError,\n HttpInternalServerError,\n HttpTooManyRequestsError,\n HttpVendorError,\n HttpUserError,\n OfflineError,\n // Error subtype constants\n ENTITY_NOT_FOUND,\n WRONG_LOGIN_TYPE,\n WRONG_LOGIN,\n NOT_APPROVED,\n EMAIL_NOT_CONFIRMED,\n WRONG_DOMAIN,\n WRONG_COMPANY,\n NO_REG_CODE,\n} from './http/errors';\n\nexport { NetworkRejectClassifier } from './http/networkReject';\n\n// Date/Time DTOs and Utilities (inspired by Java Time / JSR-310)\nexport {\n InstantDto,\n DateDto,\n TimeDto,\n DateTimeDto,\n InstantUtil,\n DateUtil,\n TimeUtil,\n DateTimeUtil,\n} from './http/datetime';\n\n// Context keys + registry (the global magic-context header system)\nexport { HeaderRegistry } from './http/HeaderRegistry';\nexport { ClientRegistry } from './http/ClientRegistry';\nexport { CallRegistry } from './http/CallRegistry';\nexport { CallDeadline } from './http/CallDeadline';\nexport { CallContext } from './http/CallStrategy';\nexport type { Attempt, CallStrategy } from './http/CallStrategy';\nexport { TimeoutError } from './http/TimeoutError';\nexport type { ServiceUrlDeriver } from './http/ClientRegistry';\n\n// \"What service am I\" — set once at startup, read by the logging backends and by\n// RequestContextHeaders (to stamp requestIdSource on ids this service mints).\nexport { ServiceInfo } from './http/ServiceInfo';\n// \"Where am I running\" — declared once at startup (setupRuntime, from RuntimeSetupOptions.locality).\n// The ONE input to @WpAuthLocalOnly enforcement. Undeclared reads as DEPLOYED (fail safe).\nexport { RuntimeLocality } from './http/RuntimeLocality';\nexport type { Locality } from './http/RuntimeLocality';\n// The ENTIRE HTTP response as pure data — the ONE form both transports (express, fetch) are\n// normalised into, so an ErrorTranslators implementation is written once and serves both.\nexport { HttpHeader, HttpResponseStatus, HttpResponseDto } from './http/HttpResponseDto';\n// Pluggable, bidirectional error translation (app exception <-> the WHOLE response). Set on\n// ClientRegistry at startup; consulted before the built-in webpieces mapping on BOTH sides.\nexport type { ErrorTranslators } from './http/ErrorTranslators';\n// Pluggable per-client failure classification (is a thrown API-call error a real failure or an\n// expected non-failure?). Registered on ClientRegistry at startup; consulted by LogApiCall.\nexport type { FailureClassifier } from './http/FailureClassifier';\nexport { KeyedFailureClassifier } from './http/FailureClassifier';\nexport {\n WebpiecesDefaultFailureClassifier,\n WEBPIECES_DEFAULT_FAILURE_CLASSIFIER,\n} from './http/WebpiecesDefaultFailureClassifier';\nexport { templateDeriver } from './http/templateDeriver';\nexport { WebpiecesCoreHeaders } from './http/WebpiecesCoreHeaders';\nexport { ContextReader } from './http/ContextReader';\n\n// The OUTBOUND half of the trust model: whether a TRUSTED context key may ride to the endpoint being\n// called. Built ONLY from the destination endpoint's AuthMode — see the class doc.\nexport { DestinationTrust } from './http/DestinationTrust';\n\n// BROWSER-ONLY outbound-header propagation (app-held store + registry -> outbound HTTP headers).\n// Only @webpieces/http-client-browser may name it; the server reads RequestContext directly via\n// RequestContextHeaders in the Node-only @webpieces/core-context.\nexport { ContextMgr } from './http/ContextMgr';\n\n// API-call logging helper (uses LogManager above). NOT a singleton: construct one per environment\n// with that environment's ApiCallContext — `new LogApiCallImpl(new RequestContextApiCallContext())`\n// on node, `new LogApiCallImpl(new BrowserApiCallContext())` in a browser.\nexport { LogApiCallImpl } from './http/LogApiCall';\n\n// Opt-in field masking for the LogApiCall log path — declare per-api sensitive fields so secrets\n// (OAuth refresh tokens, id-token JWTs) are masked in the logs while the real value stays on the wire.\nexport { MaskSpec } from './http/LogFieldMask';\nexport type { MaskMode } from './http/LogFieldMask';\n\n// The structured `api` tag + the context-writer seam LogApiCall stamps through. The Node\n// RequestContext-backed impl lives in @webpieces/core-context, the browser one in\n// @webpieces/http-client-browser; each is CONSTRUCTED by its package, never installed globally.\nexport { ApiCallInfo } from './http/ApiCallInfo';\nexport type { ApiType, ApiResult } from './http/ApiCallInfo';\n// Console-render bridge: turns LogApiCall's [LogApiCall] bracket into [API.{side}.{phase}] locally.\nexport {\n ApiCallLogName,\n ApiCallLogNameImpl,\n LOG_API_CALL_LOGGER_NAME,\n} from './http/ApiCallLogName';\nexport { ApiMethodInfo } from './http/ApiMethodInfo';\nexport type { ApiSide } from './http/ApiMethodInfo';\nexport type { ApiCallContext } from './http/ApiCallContext';\n\n// Test-case recording contract (impl lives in http-server; hooks in http-client)\nexport { TestCaseRecorder, RecorderKeys } from './http/recorder/TestCaseRecorder';\nexport {\n RecordedEndpoint,\n RecordedError,\n RecordedTestCase,\n} from './http/recorder/RecordedEndpoint';\nexport { DoNotRecord, getDoNotRecordFields } from './http/recorder/DoNotRecord';\nexport { RecordSerializer, SerializedMap, SerializedError } from './http/recorder/RecordSerializer';\n\n// ---------------------------------------------------------------------------------------------\n// Filter-chain primitives, shared by BOTH chains: the inbound server chain\n// (`Filter<MethodMeta, WpResponse<unknown>>`, @webpieces/http-routing) and the outbound client\n// chain (`Filter<ClientRequest, Response>`, @webpieces/http-client-core). Declared once, here, in\n// the package both depend on — see the class doc for why a second pair would be a shim.\nexport { Filter } from './filters/Filter';\nexport type { Service } from './filters/Filter';\nexport { FilterChain } from './filters/FilterChain';\n\nexport {\n ApiError,\n NotFoundError,\n BadGatewayError,\n ServiceUnavailableError,\n GatewayTimeoutError,\n InternalError,\n TooManyRequestsError,\n ForbiddenError,\n RequestTimeoutError,\n UserError,\n BadRequestError,\n UnauthorizedError,\n VendorError,\n ApiErrorCodec,\n ApiErrorPayload,\n} from './errors';\nexport { HttpErrorStatus } from './http/HttpErrorStatus';\n"]}
@@ -0,0 +1,23 @@
1
+ import 'reflect-metadata';
2
+ import { MaskSpec } from '../http/LogFieldMask';
3
+ export type IpcEndpointKind = 'request' | 'notification';
4
+ export interface IpcEndpointOptions {
5
+ kind?: IpcEndpointKind;
6
+ }
7
+ export type IpcApiType<T> = abstract new (...args: never[]) => T;
8
+ export declare const IPC_METADATA_KEYS: {
9
+ readonly API_ID: "webpieces:ipc-api-id";
10
+ readonly ENDPOINTS: "webpieces:ipc-endpoints";
11
+ readonly KINDS: "webpieces:ipc-kinds";
12
+ };
13
+ /** Marks a contract as IPC-only. HTTP routers and clients must reject it. */
14
+ export declare function WpInternal(apiId: string): ClassDecorator;
15
+ /** Declares the stable wire method ID for one method on an IPC-only contract. */
16
+ export declare function WpIpcEndpoint(methodId: string, options?: IpcEndpointOptions): MethodDecorator;
17
+ export declare function isInternalApi(apiClass: Function): boolean;
18
+ export declare function getIpcApiId(apiClass: Function): string | undefined;
19
+ export declare function getIpcEndpoints(apiClass: Function): Readonly<Record<string, string>>;
20
+ export declare function getIpcEndpointKind(apiClass: Function, methodName: string): IpcEndpointKind;
21
+ export declare function getIpcMaskSpec(apiClass: Function, methodName: string): MaskSpec | undefined;
22
+ export declare function assertInternalApi(apiClass: Function): string;
23
+ export declare function assertNotInternalApi(apiClass: Function, transport: string): void;
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IPC_METADATA_KEYS = void 0;
4
+ exports.WpInternal = WpInternal;
5
+ exports.WpIpcEndpoint = WpIpcEndpoint;
6
+ exports.isInternalApi = isInternalApi;
7
+ exports.getIpcApiId = getIpcApiId;
8
+ exports.getIpcEndpoints = getIpcEndpoints;
9
+ exports.getIpcEndpointKind = getIpcEndpointKind;
10
+ exports.getIpcMaskSpec = getIpcMaskSpec;
11
+ exports.assertInternalApi = assertInternalApi;
12
+ exports.assertNotInternalApi = assertNotInternalApi;
13
+ require("reflect-metadata");
14
+ const errors_1 = require("../errors");
15
+ const decorators_1 = require("../http/decorators");
16
+ const IpcIdentity_1 = require("./IpcIdentity");
17
+ exports.IPC_METADATA_KEYS = {
18
+ API_ID: 'webpieces:ipc-api-id',
19
+ ENDPOINTS: 'webpieces:ipc-endpoints',
20
+ KINDS: 'webpieces:ipc-kinds',
21
+ };
22
+ /** Marks a contract as IPC-only. HTTP routers and clients must reject it. */
23
+ // webpieces-disable no-function-outside-class -- IPC decorator or immutable reflection metadata helper
24
+ function WpInternal(apiId) {
25
+ IpcIdentity_1.IpcIdentity.assert(apiId, 'API');
26
+ return (target) => {
27
+ const className = target.name || 'Unknown';
28
+ if (Reflect.hasMetadata(decorators_1.METADATA_KEYS.API_PATH, target) ||
29
+ Reflect.hasMetadata(decorators_1.METADATA_KEYS.ENDPOINTS, target)) {
30
+ throw new errors_1.InternalError(`Internal API ${className} cannot use @ApiPath or @Endpoint.`);
31
+ }
32
+ const authMethods = Reflect.getMetadata(decorators_1.METADATA_KEYS.AUTH_METHODS, target) || [];
33
+ if (authMethods.length > 0 || Reflect.hasMetadata(decorators_1.METADATA_KEYS.AUTH_META, target)) {
34
+ throw new errors_1.InternalError(`Internal API ${className} cannot use HTTP authorization decorators.`);
35
+ }
36
+ Reflect.defineMetadata(exports.IPC_METADATA_KEYS.API_ID, apiId, target);
37
+ };
38
+ }
39
+ /** Declares the stable wire method ID for one method on an IPC-only contract. */
40
+ // webpieces-disable no-function-outside-class -- IPC decorator or immutable reflection metadata helper
41
+ function WpIpcEndpoint(methodId, options = {}) {
42
+ IpcIdentity_1.IpcIdentity.assert(methodId, 'method');
43
+ const kind = options.kind ?? 'request';
44
+ if (kind !== 'request' && kind !== 'notification')
45
+ throw new errors_1.BadRequestError('Invalid IPC endpoint kind');
46
+ return (target, propertyKey) => {
47
+ const apiClass = target.constructor;
48
+ const key = propertyKey;
49
+ if (['then', 'constructor', '__proto__'].includes(key)) {
50
+ throw new errors_1.BadRequestError(`Invalid IPC method name: ${key}`);
51
+ }
52
+ const endpoints = Reflect.getMetadata(exports.IPC_METADATA_KEYS.ENDPOINTS, apiClass) || {};
53
+ if (Object.values(endpoints).includes(methodId)) {
54
+ throw new errors_1.BadRequestError(`Duplicate IPC method identity: ${methodId}`);
55
+ }
56
+ endpoints[key] = methodId;
57
+ Reflect.defineMetadata(exports.IPC_METADATA_KEYS.ENDPOINTS, endpoints, apiClass);
58
+ const kinds = Reflect.getMetadata(exports.IPC_METADATA_KEYS.KINDS, apiClass) || {};
59
+ kinds[key] = kind;
60
+ Reflect.defineMetadata(exports.IPC_METADATA_KEYS.KINDS, kinds, apiClass);
61
+ };
62
+ }
63
+ // webpieces-disable no-function-outside-class -- IPC decorator or immutable reflection metadata helper
64
+ function isInternalApi(apiClass) {
65
+ return Reflect.hasMetadata(exports.IPC_METADATA_KEYS.API_ID, apiClass);
66
+ }
67
+ // webpieces-disable no-function-outside-class -- IPC decorator or immutable reflection metadata helper
68
+ function getIpcApiId(apiClass) {
69
+ return Reflect.getMetadata(exports.IPC_METADATA_KEYS.API_ID, apiClass);
70
+ }
71
+ // webpieces-disable no-function-outside-class -- IPC decorator or immutable reflection metadata helper
72
+ function getIpcEndpoints(apiClass) {
73
+ return Reflect.getMetadata(exports.IPC_METADATA_KEYS.ENDPOINTS, apiClass) || {};
74
+ }
75
+ // webpieces-disable no-function-outside-class -- IPC decorator or immutable reflection metadata helper
76
+ function getIpcEndpointKind(apiClass, methodName) {
77
+ const kinds = Reflect.getMetadata(exports.IPC_METADATA_KEYS.KINDS, apiClass) || {};
78
+ return kinds[methodName] ?? 'request';
79
+ }
80
+ // webpieces-disable no-function-outside-class -- IPC decorator or immutable reflection metadata helper
81
+ function getIpcMaskSpec(apiClass, methodName) {
82
+ return (0, decorators_1.getMaskSpec)(apiClass, methodName);
83
+ }
84
+ // webpieces-disable no-function-outside-class -- IPC decorator or immutable reflection metadata helper
85
+ function assertInternalApi(apiClass) {
86
+ const apiId = getIpcApiId(apiClass);
87
+ if (!apiId)
88
+ throw new errors_1.InternalError(`Class ${apiClass.name || 'Unknown'} must be decorated with @WpInternal(apiId).`);
89
+ if (Reflect.hasMetadata(decorators_1.METADATA_KEYS.API_PATH, apiClass) ||
90
+ Reflect.hasMetadata(decorators_1.METADATA_KEYS.ENDPOINTS, apiClass)) {
91
+ throw new errors_1.InternalError(`Internal API ${apiClass.name || 'Unknown'} cannot use @ApiPath or @Endpoint.`);
92
+ }
93
+ if (Object.keys(getIpcEndpoints(apiClass)).length === 0) {
94
+ throw new errors_1.InternalError(`Internal API ${apiClass.name || 'Unknown'} must declare at least one @WpIpcEndpoint.`);
95
+ }
96
+ return apiId;
97
+ }
98
+ // webpieces-disable no-function-outside-class -- IPC decorator or immutable reflection metadata helper
99
+ function assertNotInternalApi(apiClass, transport) {
100
+ if (isInternalApi(apiClass)) {
101
+ throw new errors_1.InternalError(`${transport} cannot use @WpInternal API ${apiClass.name || 'Unknown'}; use the IPC factories.`);
102
+ }
103
+ }
104
+ //# sourceMappingURL=IpcDecorators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IpcDecorators.js","sourceRoot":"","sources":["../../../../../../packages/core/core-util/src/ipc/IpcDecorators.ts"],"names":[],"mappings":";;;AAoBA,gCAkBC;AAID,sCAuBC;AAGD,sCAEC;AAGD,kCAEC;AAGD,0CAEC;AAGD,gDAIC;AAGD,wCAEC;AAGD,8CAoBC;AAGD,oDAMC;AA5HD,4BAA0B;AAC1B,sCAA2D;AAC3D,mDAAgE;AAEhE,+CAA4C;AAQ/B,QAAA,iBAAiB,GAAG;IAC7B,MAAM,EAAE,sBAAsB;IAC9B,SAAS,EAAE,yBAAyB;IACpC,KAAK,EAAE,qBAAqB;CACtB,CAAC;AAEX,6EAA6E;AAC7E,uGAAuG;AACvG,SAAgB,UAAU,CAAC,KAAa;IACpC,yBAAW,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACjC,OAAO,CAAC,MAAgB,EAAE,EAAE;QACxB,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,IAAI,SAAS,CAAC;QAC3C,IACI,OAAO,CAAC,WAAW,CAAC,0BAAa,CAAC,QAAQ,EAAE,MAAM,CAAC;YACnD,OAAO,CAAC,WAAW,CAAC,0BAAa,CAAC,SAAS,EAAE,MAAM,CAAC,EACtD,CAAC;YACC,MAAM,IAAI,sBAAa,CAAC,gBAAgB,SAAS,oCAAoC,CAAC,CAAC;QAC3F,CAAC;QACD,MAAM,WAAW,GAAa,OAAO,CAAC,WAAW,CAAC,0BAAa,CAAC,YAAY,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;QAC5F,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,IAAI,OAAO,CAAC,WAAW,CAAC,0BAAa,CAAC,SAAS,EAAE,M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I,sBAAa,CACnB,SAAS,QAAQ,CAAC,IAAI,IAAI,SAAS,6CAA6C,CACnF,CAAC;IACN,IACI,OAAO,CAAC,WAAW,CAAC,0BAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC;QACrD,OAAO,CAAC,WAAW,CAAC,0BAAa,CAAC,SAAS,EAAE,QAAQ,CAAC,EACxD,CAAC;QACC,MAAM,IAAI,sBAAa,CACnB,gBAAgB,QAAQ,CAAC,IAAI,IAAI,SAAS,oCAAoC,CACjF,CAAC;IACN,CAAC;IACD,IAAI,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtD,MAAM,IAAI,sBAAa,CACnB,gBAAgB,QAAQ,CAAC,IAAI,IAAI,SAAS,4CAA4C,CACzF,CAAC;IACN,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC;AAED,uGAAuG;AACvG,SAAgB,oBAAoB,CAAC,QAAkB,EAAE,SAAiB;IACtE,IAAI,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,sBAAa,CACnB,GAAG,SAAS,+BAA+B,QAAQ,CAAC,IAAI,IAAI,SAAS,0BAA0B,CAClG,CAAC;IACN,CAAC;AACL,CAAC","sourcesContent":["import 'reflect-metadata';\nimport { BadRequestError, InternalError } from '../errors';\nimport { getMaskSpec, METADATA_KEYS } from '../http/decorators';\nimport { MaskSpec } from '../http/LogFieldMask';\nimport { IpcIdentity } from './IpcIdentity';\n\nexport type IpcEndpointKind = 'request' | 'notification';\nexport interface IpcEndpointOptions {\n kind?: IpcEndpointKind;\n}\nexport type IpcApiType<T> = abstract new (...args: never[]) => T;\n\nexport const IPC_METADATA_KEYS = {\n API_ID: 'webpieces:ipc-api-id',\n ENDPOINTS: 'webpieces:ipc-endpoints',\n KINDS: 'webpieces:ipc-kinds',\n} as const;\n\n/** Marks a contract as IPC-only. HTTP routers and clients must reject it. */\n// webpieces-disable no-function-outside-class -- IPC decorator or immutable reflection metadata helper\nexport function WpInternal(apiId: string): ClassDecorator {\n IpcIdentity.assert(apiId, 'API');\n return (target: Function) => {\n const className = target.name || 'Unknown';\n if (\n Reflect.hasMetadata(METADATA_KEYS.API_PATH, target) ||\n Reflect.hasMetadata(METADATA_KEYS.ENDPOINTS, target)\n ) {\n throw new InternalError(`Internal API ${className} cannot use @ApiPath or @Endpoint.`);\n }\n const authMethods: string[] = Reflect.getMetadata(METADATA_KEYS.AUTH_METHODS, target) || [];\n if (authMethods.length > 0 || Reflect.hasMetadata(METADATA_KEYS.AUTH_META, target)) {\n throw new InternalError(\n `Internal API ${className} cannot use HTTP authorization decorators.`,\n );\n }\n Reflect.defineMetadata(IPC_METADATA_KEYS.API_ID, apiId, target);\n };\n}\n\n/** Declares the stable wire method ID for one method on an IPC-only contract. */\n// webpieces-disable no-function-outside-class -- IPC decorator or immutable reflection metadata helper\nexport function WpIpcEndpoint(methodId: string, options: IpcEndpointOptions = {}): MethodDecorator {\n IpcIdentity.assert(methodId, 'method');\n const kind = options.kind ?? 'request';\n if (kind !== 'request' && kind !== 'notification')\n throw new BadRequestError('Invalid IPC endpoint kind');\n return (target: object, propertyKey: string | symbol) => {\n const apiClass = target.constructor;\n const key = propertyKey as string;\n if (['then', 'constructor', '__proto__'].includes(key)) {\n throw new BadRequestError(`Invalid IPC method name: ${key}`);\n }\n const endpoints: Record<string, string> =\n Reflect.getMetadata(IPC_METADATA_KEYS.ENDPOINTS, apiClass) || {};\n if (Object.values(endpoints).includes(methodId)) {\n throw new BadRequestError(`Duplicate IPC method identity: ${methodId}`);\n }\n endpoints[key] = methodId;\n Reflect.defineMetadata(IPC_METADATA_KEYS.ENDPOINTS, endpoints, apiClass);\n const kinds: Record<string, IpcEndpointKind> =\n Reflect.getMetadata(IPC_METADATA_KEYS.KINDS, apiClass) || {};\n kinds[key] = kind;\n Reflect.defineMetadata(IPC_METADATA_KEYS.KINDS, kinds, apiClass);\n };\n}\n\n// webpieces-disable no-function-outside-class -- IPC decorator or immutable reflection metadata helper\nexport function isInternalApi(apiClass: Function): boolean {\n return Reflect.hasMetadata(IPC_METADATA_KEYS.API_ID, apiClass);\n}\n\n// webpieces-disable no-function-outside-class -- IPC decorator or immutable reflection metadata helper\nexport function getIpcApiId(apiClass: Function): string | undefined {\n return Reflect.getMetadata(IPC_METADATA_KEYS.API_ID, apiClass);\n}\n\n// webpieces-disable no-function-outside-class -- IPC decorator or immutable reflection metadata helper\nexport function getIpcEndpoints(apiClass: Function): Readonly<Record<string, string>> {\n return Reflect.getMetadata(IPC_METADATA_KEYS.ENDPOINTS, apiClass) || {};\n}\n\n// webpieces-disable no-function-outside-class -- IPC decorator or immutable reflection metadata helper\nexport function getIpcEndpointKind(apiClass: Function, methodName: string): IpcEndpointKind {\n const kinds: Record<string, IpcEndpointKind> =\n Reflect.getMetadata(IPC_METADATA_KEYS.KINDS, apiClass) || {};\n return kinds[methodName] ?? 'request';\n}\n\n// webpieces-disable no-function-outside-class -- IPC decorator or immutable reflection metadata helper\nexport function getIpcMaskSpec(apiClass: Function, methodName: string): MaskSpec | undefined {\n return getMaskSpec(apiClass, methodName);\n}\n\n// webpieces-disable no-function-outside-class -- IPC decorator or immutable reflection metadata helper\nexport function assertInternalApi(apiClass: Function): string {\n const apiId = getIpcApiId(apiClass);\n if (!apiId)\n throw new InternalError(\n `Class ${apiClass.name || 'Unknown'} must be decorated with @WpInternal(apiId).`,\n );\n if (\n Reflect.hasMetadata(METADATA_KEYS.API_PATH, apiClass) ||\n Reflect.hasMetadata(METADATA_KEYS.ENDPOINTS, apiClass)\n ) {\n throw new InternalError(\n `Internal API ${apiClass.name || 'Unknown'} cannot use @ApiPath or @Endpoint.`,\n );\n }\n if (Object.keys(getIpcEndpoints(apiClass)).length === 0) {\n throw new InternalError(\n `Internal API ${apiClass.name || 'Unknown'} must declare at least one @WpIpcEndpoint.`,\n );\n }\n return apiId;\n}\n\n// webpieces-disable no-function-outside-class -- IPC decorator or immutable reflection metadata helper\nexport function assertNotInternalApi(apiClass: Function, transport: string): void {\n if (isInternalApi(apiClass)) {\n throw new InternalError(\n `${transport} cannot use @WpInternal API ${apiClass.name || 'Unknown'}; use the IPC factories.`,\n );\n }\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export declare class IpcIdentity {
2
+ static assert(value: unknown, label: string): asserts value is string;
3
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IpcIdentity = void 0;
4
+ const errors_1 = require("../errors");
5
+ class IpcIdentity {
6
+ // webpieces-disable no-function-outside-class -- portable stateless IPC primitive; no platform DI container exists on this boundary; webpieces-disable no-any-unknown -- untrusted IPC data is schema-validated; generic dispatch cannot assume a DTO type before validation
7
+ static assert(value, label) {
8
+ if (typeof value !== 'string' || !/^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,127}$/.test(value)) {
9
+ throw new errors_1.BadRequestError(`Invalid IPC ${label} identity`);
10
+ }
11
+ }
12
+ }
13
+ exports.IpcIdentity = IpcIdentity;
14
+ //# sourceMappingURL=IpcIdentity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IpcIdentity.js","sourceRoot":"","sources":["../../../../../../packages/core/core-util/src/ipc/IpcIdentity.ts"],"names":[],"mappings":";;;AAAA,sCAA4C;AAE5C,MAAa,WAAW;IACpB,6QAA6Q;IAC7Q,MAAM,CAAC,MAAM,CAAC,KAAc,EAAE,KAAa;QACvC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,qCAAqC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YAClF,MAAM,IAAI,wBAAe,CAAC,eAAe,KAAK,WAAW,CAAC,CAAC;QAC/D,CAAC;IACL,CAAC;CACJ;AAPD,kCAOC","sourcesContent":["import { BadRequestError } from '../errors';\n\nexport class IpcIdentity {\n // webpieces-disable no-function-outside-class -- portable stateless IPC primitive; no platform DI container exists on this boundary; webpieces-disable no-any-unknown -- untrusted IPC data is schema-validated; generic dispatch cannot assume a DTO type before validation\n static assert(value: unknown, label: string): asserts value is string {\n if (typeof value !== 'string' || !/^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,127}$/.test(value)) {\n throw new BadRequestError(`Invalid IPC ${label} identity`);\n }\n }\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IpcProtocol = exports.IpcFailure = exports.IpcSuccess = exports.IpcRequest = exports.IpcCallContext = void 0;
4
4
  const errors_1 = require("../errors");
5
- const IpcContract_1 = require("./IpcContract");
5
+ const IpcIdentity_1 = require("./IpcIdentity");
6
6
  class IpcCallContext {
7
7
  txId;
8
8
  callId;
@@ -11,10 +11,10 @@ class IpcCallContext {
11
11
  this.txId = txId;
12
12
  this.callId = callId;
13
13
  this.parentCallId = parentCallId;
14
- IpcContract_1.IpcIdentity.assert(txId, 'transaction');
15
- IpcContract_1.IpcIdentity.assert(callId, 'call');
14
+ IpcIdentity_1.IpcIdentity.assert(txId, 'transaction');
15
+ IpcIdentity_1.IpcIdentity.assert(callId, 'call');
16
16
  if (parentCallId !== undefined)
17
- IpcContract_1.IpcIdentity.assert(parentCallId, 'parent call');
17
+ IpcIdentity_1.IpcIdentity.assert(parentCallId, 'parent call');
18
18
  }
19
19
  }
20
20
  exports.IpcCallContext = IpcCallContext;
@@ -77,8 +77,8 @@ class IpcProtocol {
77
77
  const context = new IpcCallContext(raw['txId'], raw['callId'], raw['parentCallId']);
78
78
  switch (value['type']) {
79
79
  case 'request':
80
- IpcContract_1.IpcIdentity.assert(value['apiId'], 'API');
81
- IpcContract_1.IpcIdentity.assert(value['methodId'], 'method');
80
+ IpcIdentity_1.IpcIdentity.assert(value['apiId'], 'API');
81
+ IpcIdentity_1.IpcIdentity.assert(value['methodId'], 'method');
82
82
  if (!Object.prototype.hasOwnProperty.call(value, 'body'))
83
83
  throw new errors_1.InternalError('Missing IPC request body');
84
84
  return new IpcRequest(value['apiId'], value['methodId'], context, value['body']);
@@ -1 +1 @@
1
- {"version":3,"file":"IpcProtocol.js","sourceRoot":"","sources":["../../../../../../packages/core/core-util/src/ipc/IpcProtocol.ts"],"names":[],"mappings":";;;AAAA,sCAA2D;AAC3D,+CAA4C;AAE5C,MAAa,cAAc;IAEV;IACA;IACA;IAHb,YACa,IAAY,EACZ,MAAc,EACd,YAAqB;QAFrB,SAAI,GAAJ,IAAI,CAAQ;QACZ,WAAM,GAAN,MAAM,CAAQ;QACd,iBAAY,GAAZ,YAAY,CAAS;QAE9B,yBAAW,CAAC,MAAM,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;QACxC,yBAAW,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACnC,IAAI,YAAY,KAAK,SAAS;YAAE,yBAAW,CAAC,MAAM,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;IACpF,CAAC;CACJ;AAVD,wCAUC;AAED,MAAa,UAAU;IAIN;IACA;IACA;IAEA;IAPJ,OAAO,GAAG,CAAC,CAAC;IACZ,IAAI,GAAG,SAAS,CAAC;IAC1B,YACa,KAAa,EACb,QAAgB,EAChB,OAAuB;IAChC,0IAA0I;IACjI,IAAa;QAJb,UAAK,GAAL,KAAK,CAAQ;QACb,aAAQ,GAAR,QAAQ,CAAQ;QAChB,YAAO,GAAP,OAAO,CAAgB;QAEvB,SAAI,GAAJ,IAAI,CAAS;IACvB,CAAC;CACP;AAVD,gCAUC;AACD,MAAa,UAAU;IAIN;IAEA;IALJ,OAAO,GAAG,CAAC,CAAC;IACZ,IAAI,GAAG,SAAS,CAAC;IAC1B,YACa,OAAuB;IAChC,0IAA0I;IACjI,IAAa;QAFb,YAAO,GAAP,OAAO,CAAgB;QAEvB,SAAI,GAAJ,IAAI,CAAS;IACvB,CAAC;CACP;AARD,gCAQC;AACD,MAAa,UAAU;IAIN;IACA;IAJJ,OAAO,GAAG,CAAC,CAAC;IACZ,IAAI,GAAG,SAAS,CAAC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AM,IAAI,sBAAa,CAAC,0BAA0B,CAAC,CAAC;gBACxD,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;YACrF,KAAK,SAAS;gBACV,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC;oBACpD,MAAM,IAAI,sBAAa,CAAC,0BAA0B,CAAC,CAAC;gBACxD,OAAO,IAAI,UAAU,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;YAClD,KAAK,SAAS;gBACV,OAAO,IAAI,UAAU,CACjB,OAAO;gBACP,0IAA0I;gBAC1I,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAA+B,CACnE,CAAC;YACN;gBACI,MAAM,IAAI,sBAAa,CAAC,mCAAmC,CAAC,CAAC;QACrE,CAAC;IACL,CAAC;IAED,oIAAoI;IACpI,MAAM,CAAC,WAAW,CAAC,CAAiB,EAAE,CAAiB;QACnD,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,YAAY,CAAC;IAC3F,CAAC;CACJ;AA9CD,kCA8CC","sourcesContent":["import { ApiErrorPayload, InternalError } from '../errors';\nimport { IpcIdentity } from './IpcContract';\n\nexport class IpcCallContext {\n constructor(\n readonly txId: string,\n readonly callId: string,\n readonly parentCallId?: string,\n ) {\n IpcIdentity.assert(txId, 'transaction');\n IpcIdentity.assert(callId, 'call');\n if (parentCallId !== undefined) IpcIdentity.assert(parentCallId, 'parent call');\n }\n}\n\nexport class IpcRequest {\n readonly version = 1;\n readonly type = 'request';\n constructor(\n readonly apiId: string,\n readonly methodId: string,\n readonly context: IpcCallContext,\n // webpieces-disable no-any-unknown -- untrusted IPC data is schema-validated; generic dispatch cannot assume a DTO type before validation\n readonly body: unknown,\n ) {}\n}\nexport class IpcSuccess {\n readonly version = 1;\n readonly type = 'success';\n constructor(\n readonly context: IpcCallContext,\n // webpieces-disable no-any-unknown -- untrusted IPC data is schema-validated; generic dispatch cannot assume a DTO type before validation\n readonly body: unknown,\n ) {}\n}\nexport class IpcFailure {\n readonly version = 1;\n readonly type = 'failure';\n constructor(\n readonly context: IpcCallContext,\n readonly error: ApiErrorPayload,\n ) {}\n}\nexport type IpcReply = IpcSuccess | IpcFailure;\nexport type IpcMessage = IpcRequest | IpcReply;\n\nexport class IpcProtocol {\n // webpieces-disable no-function-outside-class -- portable stateless IPC primitive; no platform DI container exists on this boundary; webpieces-disable no-any-unknown -- untrusted IPC data is schema-validated; generic dispatch cannot assume a DTO type before validation\n static record(value: unknown): Record<string, unknown> {\n if (typeof value !== 'object' || value === null || Array.isArray(value)) {\n throw new InternalError('Malformed IPC envelope');\n }\n // webpieces-disable no-any-unknown -- untrusted IPC data is schema-validated; generic dispatch cannot assume a DTO type before validation\n return value as Record<string, unknown>;\n }\n\n // webpieces-disable no-function-outside-class -- portable stateless IPC primitive; no platform DI container exists on this boundary\n static parse(json: string): IpcMessage {\n const value = IpcProtocol.record(JSON.parse(json));\n if (value['version'] !== 1) throw new InternalError('Unsupported IPC protocol version');\n const raw = IpcProtocol.record(value['context']);\n const context = new IpcCallContext(\n raw['txId'] as string,\n raw['callId'] as string,\n raw['parentCallId'] as string | undefined,\n );\n switch (value['type']) {\n case 'request':\n IpcIdentity.assert(value['apiId'], 'API');\n IpcIdentity.assert(value['methodId'], 'method');\n if (!Object.prototype.hasOwnProperty.call(value, 'body'))\n throw new InternalError('Missing IPC request body');\n return new IpcRequest(value['apiId'], value['methodId'], context, value['body']);\n case 'success':\n if (!Object.prototype.hasOwnProperty.call(value, 'body'))\n throw new InternalError('Missing IPC success body');\n return new IpcSuccess(context, value['body']);\n case 'failure':\n return new IpcFailure(\n context,\n // webpieces-disable no-any-unknown -- untrusted IPC data is schema-validated; generic dispatch cannot assume a DTO type before validation\n IpcProtocol.record(value['error']) as unknown as ApiErrorPayload,\n );\n default:\n throw new InternalError('Invalid IPC message discriminator');\n }\n }\n\n // webpieces-disable no-function-outside-class -- portable stateless IPC primitive; no platform DI container exists on this boundary\n static sameContext(a: IpcCallContext, b: IpcCallContext): boolean {\n return a.callId === b.callId && a.txId === b.txId && a.parentCallId === b.parentCallId;\n }\n}\n"]}
1
+ {"version":3,"file":"IpcProtocol.js","sourceRoot":"","sources":["../../../../../../packages/core/core-util/src/ipc/IpcProtocol.ts"],"names":[],"mappings":";;;AAAA,sCAA2D;AAC3D,+CAA4C;AAE5C,MAAa,cAAc;IAEV;IACA;IACA;IAHb,YACa,IAAY,EACZ,MAAc,EACd,YAAqB;QAFrB,SAAI,GAAJ,IAAI,CAAQ;QACZ,WAAM,GAAN,MAAM,CAAQ;QACd,iBAAY,GAAZ,YAAY,CAAS;QAE9B,yBAAW,CAAC,MAAM,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;QACxC,yBAAW,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACnC,IAAI,YAAY,KAAK,SAAS;YAAE,yBAAW,CAAC,MAAM,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;IACpF,CAAC;CACJ;AAVD,wCAUC;AAED,MAAa,UAAU;IAIN;IACA;IACA;IAEA;IAPJ,OAAO,GAAG,CAAC,CAAC;IACZ,IAAI,GAAG,SAAS,CAAC;IAC1B,YACa,KAAa,EACb,QAAgB,EAChB,OAAuB;IAChC,0IAA0I;IACjI,IAAa;QAJb,UAAK,GAAL,KAAK,CAAQ;QACb,aAAQ,GAAR,QAAQ,CAAQ;QAChB,YAAO,GAAP,OAAO,CAAgB;QAEvB,SAAI,GAAJ,IAAI,CAAS;IACvB,CAAC;CACP;AAVD,gCAUC;AACD,MAAa,UAAU;IAIN;IAEA;IALJ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dentity } from './IpcIdentity';\n\nexport class IpcCallContext {\n constructor(\n readonly txId: string,\n readonly callId: string,\n readonly parentCallId?: string,\n ) {\n IpcIdentity.assert(txId, 'transaction');\n IpcIdentity.assert(callId, 'call');\n if (parentCallId !== undefined) IpcIdentity.assert(parentCallId, 'parent call');\n }\n}\n\nexport class IpcRequest {\n readonly version = 1;\n readonly type = 'request';\n constructor(\n readonly apiId: string,\n readonly methodId: string,\n readonly context: IpcCallContext,\n // webpieces-disable no-any-unknown -- untrusted IPC data is schema-validated; generic dispatch cannot assume a DTO type before validation\n readonly body: unknown,\n ) {}\n}\nexport class IpcSuccess {\n readonly version = 1;\n readonly type = 'success';\n constructor(\n readonly context: IpcCallContext,\n // webpieces-disable no-any-unknown -- untrusted IPC data is schema-validated; generic dispatch cannot assume a DTO type before validation\n readonly body: unknown,\n ) {}\n}\nexport class IpcFailure {\n readonly version = 1;\n readonly type = 'failure';\n constructor(\n readonly context: IpcCallContext,\n readonly error: ApiErrorPayload,\n ) {}\n}\nexport type IpcReply = IpcSuccess | IpcFailure;\nexport type IpcMessage = IpcRequest | IpcReply;\n\nexport class IpcProtocol {\n // webpieces-disable no-function-outside-class -- portable stateless IPC primitive; no platform DI container exists on this boundary; webpieces-disable no-any-unknown -- untrusted IPC data is schema-validated; generic dispatch cannot assume a DTO type before validation\n static record(value: unknown): Record<string, unknown> {\n if (typeof value !== 'object' || value === null || Array.isArray(value)) {\n throw new InternalError('Malformed IPC envelope');\n }\n // webpieces-disable no-any-unknown -- untrusted IPC data is schema-validated; generic dispatch cannot assume a DTO type before validation\n return value as Record<string, unknown>;\n }\n\n // webpieces-disable no-function-outside-class -- portable stateless IPC primitive; no platform DI container exists on this boundary\n static parse(json: string): IpcMessage {\n const value = IpcProtocol.record(JSON.parse(json));\n if (value['version'] !== 1) throw new InternalError('Unsupported IPC protocol version');\n const raw = IpcProtocol.record(value['context']);\n const context = new IpcCallContext(\n raw['txId'] as string,\n raw['callId'] as string,\n raw['parentCallId'] as string | undefined,\n );\n switch (value['type']) {\n case 'request':\n IpcIdentity.assert(value['apiId'], 'API');\n IpcIdentity.assert(value['methodId'], 'method');\n if (!Object.prototype.hasOwnProperty.call(value, 'body'))\n throw new InternalError('Missing IPC request body');\n return new IpcRequest(value['apiId'], value['methodId'], context, value['body']);\n case 'success':\n if (!Object.prototype.hasOwnProperty.call(value, 'body'))\n throw new InternalError('Missing IPC success body');\n return new IpcSuccess(context, value['body']);\n case 'failure':\n return new IpcFailure(\n context,\n // webpieces-disable no-any-unknown -- untrusted IPC data is schema-validated; generic dispatch cannot assume a DTO type before validation\n IpcProtocol.record(value['error']) as unknown as ApiErrorPayload,\n );\n default:\n throw new InternalError('Invalid IPC message discriminator');\n }\n }\n\n // webpieces-disable no-function-outside-class -- portable stateless IPC primitive; no platform DI container exists on this boundary\n static sameContext(a: IpcCallContext, b: IpcCallContext): boolean {\n return a.callId === b.callId && a.txId === b.txId && a.parentCallId === b.parentCallId;\n }\n}\n"]}
@@ -1,5 +1,6 @@
1
- export { IpcContract, IpcMethod, IpcVoidSchema } from './IpcContract';
2
- export type { IpcSchema, IpcMethods, IpcApiType } from './IpcContract';
1
+ export { IpcIdentity } from './IpcIdentity';
2
+ export { WpInternal, WpIpcEndpoint, isInternalApi, getIpcApiId, getIpcEndpoints, getIpcEndpointKind, getIpcMaskSpec, assertInternalApi, assertNotInternalApi, IPC_METADATA_KEYS, } from './IpcDecorators';
3
+ export type { IpcApiType, IpcEndpointKind, IpcEndpointOptions } from './IpcDecorators';
3
4
  export { IpcCallContext, IpcRequest, IpcSuccess, IpcFailure, IpcProtocol } from './IpcProtocol';
4
5
  export type { IpcReply, IpcMessage } from './IpcProtocol';
5
6
  export { IpcConnection, IpcConnectionOptions, IpcTransportError, IpcErrors } from './IpcConnection';
@@ -7,6 +8,7 @@ export type { IpcTransport, IpcScheduler, IpcErrorOwner } from './IpcConnection'
7
8
  export { IpcCallLogger } from './IpcLogging';
8
9
  export type { IpcLogging } from './IpcLogging';
9
10
  export { MaskSpec } from '../http/LogFieldMask';
11
+ export { MaskLog } from '../http/decorators';
10
12
  export { ApiMethodInfo } from '../http/ApiMethodInfo';
11
13
  export { LogApiCallImpl } from '../http/LogApiCall';
12
14
  export type { ApiCallContext } from '../http/ApiCallContext';
package/src/ipc/index.js CHANGED
@@ -1,10 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toError = exports.TimeoutError = exports.LogApiCallImpl = exports.ApiMethodInfo = exports.MaskSpec = exports.IpcCallLogger = exports.IpcErrors = exports.IpcTransportError = exports.IpcConnectionOptions = exports.IpcConnection = exports.IpcProtocol = exports.IpcFailure = exports.IpcSuccess = exports.IpcRequest = exports.IpcCallContext = exports.IpcVoidSchema = exports.IpcMethod = exports.IpcContract = void 0;
4
- var IpcContract_1 = require("./IpcContract");
5
- Object.defineProperty(exports, "IpcContract", { enumerable: true, get: function () { return IpcContract_1.IpcContract; } });
6
- Object.defineProperty(exports, "IpcMethod", { enumerable: true, get: function () { return IpcContract_1.IpcMethod; } });
7
- Object.defineProperty(exports, "IpcVoidSchema", { enumerable: true, get: function () { return IpcContract_1.IpcVoidSchema; } });
3
+ exports.toError = exports.TimeoutError = exports.LogApiCallImpl = exports.ApiMethodInfo = exports.MaskLog = exports.MaskSpec = exports.IpcCallLogger = exports.IpcErrors = exports.IpcTransportError = exports.IpcConnectionOptions = exports.IpcConnection = exports.IpcProtocol = exports.IpcFailure = exports.IpcSuccess = exports.IpcRequest = exports.IpcCallContext = exports.IPC_METADATA_KEYS = exports.assertNotInternalApi = exports.assertInternalApi = exports.getIpcMaskSpec = exports.getIpcEndpointKind = exports.getIpcEndpoints = exports.getIpcApiId = exports.isInternalApi = exports.WpIpcEndpoint = exports.WpInternal = exports.IpcIdentity = void 0;
4
+ var IpcIdentity_1 = require("./IpcIdentity");
5
+ Object.defineProperty(exports, "IpcIdentity", { enumerable: true, get: function () { return IpcIdentity_1.IpcIdentity; } });
6
+ var IpcDecorators_1 = require("./IpcDecorators");
7
+ Object.defineProperty(exports, "WpInternal", { enumerable: true, get: function () { return IpcDecorators_1.WpInternal; } });
8
+ Object.defineProperty(exports, "WpIpcEndpoint", { enumerable: true, get: function () { return IpcDecorators_1.WpIpcEndpoint; } });
9
+ Object.defineProperty(exports, "isInternalApi", { enumerable: true, get: function () { return IpcDecorators_1.isInternalApi; } });
10
+ Object.defineProperty(exports, "getIpcApiId", { enumerable: true, get: function () { return IpcDecorators_1.getIpcApiId; } });
11
+ Object.defineProperty(exports, "getIpcEndpoints", { enumerable: true, get: function () { return IpcDecorators_1.getIpcEndpoints; } });
12
+ Object.defineProperty(exports, "getIpcEndpointKind", { enumerable: true, get: function () { return IpcDecorators_1.getIpcEndpointKind; } });
13
+ Object.defineProperty(exports, "getIpcMaskSpec", { enumerable: true, get: function () { return IpcDecorators_1.getIpcMaskSpec; } });
14
+ Object.defineProperty(exports, "assertInternalApi", { enumerable: true, get: function () { return IpcDecorators_1.assertInternalApi; } });
15
+ Object.defineProperty(exports, "assertNotInternalApi", { enumerable: true, get: function () { return IpcDecorators_1.assertNotInternalApi; } });
16
+ Object.defineProperty(exports, "IPC_METADATA_KEYS", { enumerable: true, get: function () { return IpcDecorators_1.IPC_METADATA_KEYS; } });
8
17
  var IpcProtocol_1 = require("./IpcProtocol");
9
18
  Object.defineProperty(exports, "IpcCallContext", { enumerable: true, get: function () { return IpcProtocol_1.IpcCallContext; } });
10
19
  Object.defineProperty(exports, "IpcRequest", { enumerable: true, get: function () { return IpcProtocol_1.IpcRequest; } });
@@ -20,6 +29,8 @@ var IpcLogging_1 = require("./IpcLogging");
20
29
  Object.defineProperty(exports, "IpcCallLogger", { enumerable: true, get: function () { return IpcLogging_1.IpcCallLogger; } });
21
30
  var LogFieldMask_1 = require("../http/LogFieldMask");
22
31
  Object.defineProperty(exports, "MaskSpec", { enumerable: true, get: function () { return LogFieldMask_1.MaskSpec; } });
32
+ var decorators_1 = require("../http/decorators");
33
+ Object.defineProperty(exports, "MaskLog", { enumerable: true, get: function () { return decorators_1.MaskLog; } });
23
34
  var ApiMethodInfo_1 = require("../http/ApiMethodInfo");
24
35
  Object.defineProperty(exports, "ApiMethodInfo", { enumerable: true, get: function () { return ApiMethodInfo_1.ApiMethodInfo; } });
25
36
  var LogApiCall_1 = require("../http/LogApiCall");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/core/core-util/src/ipc/index.ts"],"names":[],"mappings":";;;AAAA,6CAAsE;AAA7D,0GAAA,WAAW,OAAA;AAAE,wGAAA,SAAS,OAAA;AAAE,4GAAA,aAAa,OAAA;AAE9C,6CAAgG;AAAvF,6GAAA,cAAc,OAAA;AAAE,yGAAA,UAAU,OAAA;AAAE,yGAAA,UAAU,OAAA;AAAE,yGAAA,UAAU,OAAA;AAAE,0GAAA,WAAW,OAAA;AAExE,iDAAoG;AAA3F,8GAAA,aAAa,OAAA;AAAE,qHAAA,oBAAoB,OAAA;AAAE,kHAAA,iBAAiB,OAAA;AAAE,0GAAA,SAAS,OAAA;AAE1E,2CAA6C;AAApC,2GAAA,aAAa,OAAA;AAEtB,qDAAgD;AAAvC,wGAAA,QAAQ,OAAA;AACjB,uDAAsD;AAA7C,8GAAA,aAAa,OAAA;AACtB,iDAAoD;AAA3C,4GAAA,cAAc,OAAA;AAEvB,qDAAoD;AAA3C,4GAAA,YAAY,OAAA;AAErB,gDAA4C;AAAnC,qGAAA,OAAO,OAAA","sourcesContent":["export { IpcContract, IpcMethod, IpcVoidSchema } from './IpcContract';\nexport type { IpcSchema, IpcMethods, IpcApiType } from './IpcContract';\nexport { IpcCallContext, IpcRequest, IpcSuccess, IpcFailure, IpcProtocol } from './IpcProtocol';\nexport type { IpcReply, IpcMessage } from './IpcProtocol';\nexport { IpcConnection, IpcConnectionOptions, IpcTransportError, IpcErrors } from './IpcConnection';\nexport type { IpcTransport, IpcScheduler, IpcErrorOwner } from './IpcConnection';\nexport { IpcCallLogger } from './IpcLogging';\nexport type { IpcLogging } from './IpcLogging';\nexport { MaskSpec } from '../http/LogFieldMask';\nexport { ApiMethodInfo } from '../http/ApiMethodInfo';\nexport { LogApiCallImpl } from '../http/LogApiCall';\nexport type { ApiCallContext } from '../http/ApiCallContext';\nexport { TimeoutError } from '../http/TimeoutError';\n\nexport { toError } from '../lib/errorUtils';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/core/core-util/src/ipc/index.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,iDAWyB;AAVrB,2GAAA,UAAU,OAAA;AACV,8GAAA,aAAa,OAAA;AACb,8GAAA,aAAa,OAAA;AACb,4GAAA,WAAW,OAAA;AACX,gHAAA,eAAe,OAAA;AACf,mHAAA,kBAAkB,OAAA;AAClB,+GAAA,cAAc,OAAA;AACd,kHAAA,iBAAiB,OAAA;AACjB,qHAAA,oBAAoB,OAAA;AACpB,kHAAA,iBAAiB,OAAA;AAGrB,6CAAgG;AAAvF,6GAAA,cAAc,OAAA;AAAE,yGAAA,UAAU,OAAA;AAAE,yGAAA,UAAU,OAAA;AAAE,yGAAA,UAAU,OAAA;AAAE,0GAAA,WAAW,OAAA;AAExE,iDAAoG;AAA3F,8GAAA,aAAa,OAAA;AAAE,qHAAA,oBAAoB,OAAA;AAAE,kHAAA,iBAAiB,OAAA;AAAE,0GAAA,SAAS,OAAA;AAE1E,2CAA6C;AAApC,2GAAA,aAAa,OAAA;AAEtB,qDAAgD;AAAvC,wGAAA,QAAQ,OAAA;AACjB,iDAA6C;AAApC,qGAAA,OAAO,OAAA;AAChB,uDAAsD;AAA7C,8GAAA,aAAa,OAAA;AACtB,iDAAoD;AAA3C,4GAAA,cAAc,OAAA;AAEvB,qDAAoD;AAA3C,4GAAA,YAAY,OAAA;AAErB,gDAA4C;AAAnC,qGAAA,OAAO,OAAA","sourcesContent":["export { IpcIdentity } from './IpcIdentity';\nexport {\n WpInternal,\n WpIpcEndpoint,\n isInternalApi,\n getIpcApiId,\n getIpcEndpoints,\n getIpcEndpointKind,\n getIpcMaskSpec,\n assertInternalApi,\n assertNotInternalApi,\n IPC_METADATA_KEYS,\n} from './IpcDecorators';\nexport type { IpcApiType, IpcEndpointKind, IpcEndpointOptions } from './IpcDecorators';\nexport { IpcCallContext, IpcRequest, IpcSuccess, IpcFailure, IpcProtocol } from './IpcProtocol';\nexport type { IpcReply, IpcMessage } from './IpcProtocol';\nexport { IpcConnection, IpcConnectionOptions, IpcTransportError, IpcErrors } from './IpcConnection';\nexport type { IpcTransport, IpcScheduler, IpcErrorOwner } from './IpcConnection';\nexport { IpcCallLogger } from './IpcLogging';\nexport type { IpcLogging } from './IpcLogging';\nexport { MaskSpec } from '../http/LogFieldMask';\nexport { MaskLog } from '../http/decorators';\nexport { ApiMethodInfo } from '../http/ApiMethodInfo';\nexport { LogApiCallImpl } from '../http/LogApiCall';\nexport type { ApiCallContext } from '../http/ApiCallContext';\nexport { TimeoutError } from '../http/TimeoutError';\n\nexport { toError } from '../lib/errorUtils';\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"AuthApiKeyCompileAssertions.js","sourceRoot":"","sources":["../../../../../../packages/core/core-util/src/http/AuthApiKeyCompileAssertions.ts"],"names":[],"mappings":";;;AACA,6CAA0C;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAa,2BAA2B;IACpC,4FAA4F;IAC5F,UAAU;QACN,MAAM,IAAI,GAAa;YACnB,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,mBAAmB;YAC3B,WAAW,EAAE;gBACT,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,qCAAqC,EAAE;gBACvF,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,mBAAmB,EAAE;aAC9C;SACJ,CAAC;QACF,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,uEAAuE;IACvE,gBAAgB;QACZ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E,IAAI,EAAE,SAAS,EAAE,CAAC;QAC3E,KAAK,eAAe,CAAC;IACzB,CAAC;IAED;;;;OAIG;IACH,qBAAqB;QACjB,sFAAsF;QACtF,MAAM,MAAM,GAAG,IAAA,uBAAU,EAAC,mBAAmB,CAAC,CAAC;QAC/C,KAAK,MAAM,CAAC;IAChB,CAAC;IAED;;;;OAIG;IACH,2BAA2B,CAAC,IAAc;QACtC,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;YAChB,KAAK,QAAQ;gBACT,OAAO,QAAQ,CAAC;YACpB,KAAK,KAAK;gBACN,OAAO,KAAK,CAAC;YACjB,KAAK,MAAM;gBACP,OAAO,MAAM,CAAC;YAClB,KAAK,eAAe;gBAChB,OAAO,eAAe,CAAC;YAC3B,KAAK,SAAS;gBACV,OAAO,SAAS,CAAC;YACrB,KAAK,QAAQ;gBACT,OAAO,QAAQ,CAAC;YACpB,KAAK,YAAY;gBACb,OAAO,YAAY,CAAC;QAC5B,CAAC;IACL,CAAC;CACJ;AApFD,kEAoFC","sourcesContent":["import { ApiKeyCredential, AuthMode } from './auth-mode';\nimport { AuthApiKey } from './decorators';\n\n/**\n * COMPILE-TIME assertions for the `apikey` member of the {@link AuthMode} union and for the\n * {@link AuthApiKey} signature. Each `@ts-expect-error` below FAILS THE BUILD (TS2578, \"unused\n * '@ts-expect-error' directive\") if the line it guards ever starts compiling.\n *\n * WHY THIS IS NOT A `.spec.ts` FILE — same reason as its sibling `AuthJwtCompileAssertions.ts`:\n * tsconfig.lib.json EXCLUDES specs and vitest strips types with esbuild, so a `@ts-expect-error` in a\n * spec is inert and the suite passes whether or not the guarded line really errors.\n *\n * WHAT IT PINS.\n *\n * 1. The union member is `{ kind: 'apikey'; regime: string; credentials: [...] }` and nothing looser.\n * `regime` is the lookup key selecting WHICH key regime a route belongs to, so a mode with no\n * regime — or spelled `api-key`, which is what a reader guesses from the decorator — must not\n * type-check its way into a switch that would then silently miss it.\n * 2. `credentials` is NON-EMPTY. A regime that names no credential generates a published document\n * with no security block, which is precisely the silent failure the argument exists to remove, so\n * `[]` is a compile error rather than a runtime throw (shim shape #4).\n * 3. {@link ApiKeyCredential} makes the two OpenAPI schemes MUTUALLY exclusive: a header credential\n * must carry its header name, and a bearer credential must NOT — its location IS `Authorization`,\n * so a `name` beside it would be a lie a generator has to guess about.\n * 4. The ONE-ARGUMENT `@AuthApiKey('regime')` form is GONE. It could declare a key regime while\n * saying nothing about where the credential rides, which is the whole defect; per the\n * no-backwards-compatibility rule there is no overload and no optional second parameter left\n * behind, and this directive is what proves it.\n *\n * The EXHAUSTIVENESS half needs no directive: `apiKeyIsCoveredExhaustively` below returns on every\n * branch with no `default`, so dropping the `apikey` case makes tsc fail with TS7030 (not all code\n * paths return a value). That is the same property `AuthFilter.verifiesCaller` and\n * `DestinationTrust.forAuthMode` rely on, asserted here where it cannot be edited away by accident.\n */\nexport class AuthApiKeyCompileAssertions {\n /** The one legitimate spelling must keep compiling; asserted by the ABSENCE of an error. */\n legitimate(): AuthMode {\n const mode: AuthMode = {\n kind: 'apikey',\n regime: 'onetablet-partner',\n credentials: [\n { in: 'header', name: 'x-api-key', description: 'The key issued to your integration.' },\n { in: 'header', name: 'x-organization-id' },\n ],\n };\n return mode;\n }\n\n /** The bearer branch, likewise asserted by the ABSENCE of an error. */\n legitimateBearer(): ApiKeyCredential {\n const credential: ApiKeyCredential = { in: 'bearer', description: 'Send the key as a bearer token.' };\n return credential;\n }\n\n /** The decorator's TWO-argument form is the only one; asserted by the ABSENCE of an error. */\n legitimateDecorator(): ClassDecorator & MethodDecorator {\n return AuthApiKey('onetablet-partner', [{ in: 'header', name: 'x-api-key' }]);\n }\n\n /** Every one of these must be UNWRITABLE. A directive going unused here fails the build. */\n rejected(): void {\n // @ts-expect-error `regime` is REQUIRED — it selects which key regime, so it cannot be omitted\n const noRegime: AuthMode = { kind: 'apikey', credentials: [{ in: 'header', name: 'x-api-key' }] };\n void noRegime;\n // @ts-expect-error `credentials` is REQUIRED — a regime that declares no location is the defect\n const noCredentials: AuthMode = { kind: 'apikey', regime: 'onetablet-partner' };\n void noCredentials;\n // @ts-expect-error EMPTY is not a widening — it would emit a document with no security block\n const empty: AuthMode = { kind: 'apikey', regime: 'onetablet-partner', credentials: [] };\n void empty;\n // @ts-expect-error the discriminant is 'apikey'; 'api-key' is not a member of the union\n const misspelled: AuthMode = { kind: 'api-key', regime: 'onetablet-partner', credentials: [] };\n void misspelled;\n // @ts-expect-error bearer's location IS `Authorization`; a header name beside it is a lie\n const bearerWithName: ApiKeyCredential = { in: 'bearer', name: 'x-api-key' };\n void bearerWithName;\n // @ts-expect-error a header credential with no header name cannot become a securityScheme\n const headerWithNoName: ApiKeyCredential = { in: 'header' };\n void headerWithNoName;\n // @ts-expect-error 'query' is not reachable — the framework declares only these two locations\n const unknownLocation: ApiKeyCredential = { in: 'query', name: 'api_key' };\n void unknownLocation;\n }\n\n /**\n * The DELETED one-argument form. `@AuthApiKey('onetablet-partner')` used to compile and is now a\n * compile error naming the missing `credentials` argument — the delivery mechanism for the\n * migration, and the reason no `@deprecated` overload survives.\n */\n oneArgumentFormIsGone(): void {\n // @ts-expect-error the one-argument form is DELETED; pass the credential list as well\n const legacy = AuthApiKey('onetablet-partner');\n void legacy;\n }\n\n /**\n * Exhaustiveness, stated as code: NO `default`, a return on every branch. Deleting the `apikey`\n * case turns this into TS7030 — the compile error that forces a DECISION about a new mode's trust\n * posture rather than letting it land on one by accident.\n */\n apiKeyIsCoveredExhaustively(mode: AuthMode): string {\n switch (mode.kind) {\n case 'public':\n return 'public';\n case 'jwt':\n return 'jwt';\n case 'oidc':\n return 'oidc';\n case 'shared-secret':\n return 'shared-secret';\n case 'webhook':\n return 'webhook';\n case 'apikey':\n return 'apikey';\n case 'local-only':\n return 'local-only';\n }\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"AuthJwtCompileAssertions.js","sourceRoot":"","sources":["../../../../../../packages/core/core-util/src/http/AuthJwtCompileAssertions.ts"],"names":[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ourcesContent":["import { AuthJwt } from './decorators';\n\n/**\n * COMPILE-TIME assertions for `JwtRoles` — the guarantee that every broken role decision is a compile\n * error rather than a silent over-permissioning. Each `@ts-expect-error` below FAILS THE BUILD (TS2578,\n * \"unused '@ts-expect-error' directive\") if the line it guards ever starts compiling. Verified by\n * deliberately making a guarded line valid and watching `tsc -p tsconfig.lib.json` go red.\n *\n * WHY THIS IS NOT A `.spec.ts` FILE. It was, and it proved nothing: tsconfig.lib.json EXCLUDES spec\n * files, and vitest transpiles with esbuild, which strips types without checking them. So a\n * `@ts-expect-error` in a spec is inert — the suite passes whether or not the guarded line really\n * errors. Verified the hard way: with one guarded line deliberately made VALID, both `vitest run` and\n * `nx run core-util:ci` stayed green. A type-level guarantee must be asserted in a file the\n * type-checker actually compiles, which is any non-spec file under `src/`.\n *\n * WHY IT CALLS THE FACTORIES INSTEAD OF USING DECORATOR SYNTAX. A decorator factory is a plain\n * function, so a direct call type-checks the argument identically — and the first cut of this file,\n * which used `@ApiPath` + `@Endpoint` on an abstract class, made the architecture scanner classify\n * core-util as exporting an API contract and demand a `role:api-lib` tag. A test fixture must not\n * change what the repo believes about its own architecture.\n *\n * The counterpart RUNTIME behaviour (that `allRolesAllowed: true` reads back as `[]` through\n * `rolesRequired`) is asserted in `__tests__/pubsub-and-auth-decorators.spec.ts`, where runtime\n * assertions belong.\n */\nexport class AuthJwtCompileAssertions {\n /** The two legitimate spellings must keep compiling; this half is asserted by the ABSENCE of error. */\n legitimate(): void {\n void AuthJwt({ roles: ['admin'] });\n void AuthJwt({ roles: ['admin', 'editor'] });\n void AuthJwt({ allRolesAllowed: true });\n void AuthJwt({ allRolesAllowed: true, inOrg: true });\n void AuthJwt({ roles: ['admin'], tenantScoped: true });\n }\n\n /** Every one of these must be UNWRITABLE. A directive going unused here fails the build. */\n rejected(): void {\n // @ts-expect-error pick a branch — {} may not mean \"any authenticated user\"\n void AuthJwt({});\n // @ts-expect-error roles needs AT LEAST ONE entry; [] was the old silent widest grant\n void AuthJwt({ roles: [] });\n // @ts-expect-error contradictory: wide AND role-gated at the same time\n void AuthJwt({ allRolesAllowed: true, roles: ['admin'] });\n // @ts-expect-error allRolesAllowed:false is a redundant SECOND spelling of role-gating\n void AuthJwt({ roles: ['admin'], allRolesAllowed: false });\n // @ts-expect-error `false` is never how you say \"wide\" — the other branch is for that\n void AuthJwt({ allRolesAllowed: false });\n // @ts-expect-error app-defined fields alone authorize nothing; a role decision is mandatory\n void AuthJwt({ inOrg: true });\n }\n}\n"]}
@@ -1,4 +0,0 @@
1
- /** These assertions compile in package builds, unlike transpiled-only spec files. Never invoked. */
2
- export declare class IpcCompileAssertions {
3
- static assertExhaustiveMetadata(): void;
4
- }
@@ -1,39 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IpcCompileAssertions = void 0;
4
- const IpcContract_1 = require("./IpcContract");
5
- const LogFieldMask_1 = require("../http/LogFieldMask");
6
- class Request {
7
- id;
8
- constructor(id) {
9
- this.id = id;
10
- }
11
- }
12
- class Schema {
13
- // webpieces-disable no-any-unknown -- untrusted IPC data is schema-validated; generic dispatch cannot assume a DTO type before validation
14
- parse(value) {
15
- if (!(value instanceof Request))
16
- throw new Error('Expected Request');
17
- return value;
18
- }
19
- }
20
- class Api {
21
- }
22
- class Incomplete {
23
- first = new IpcContract_1.IpcMethod('first', new Schema(), new Schema(), new LogFieldMask_1.MaskSpec({}));
24
- }
25
- class MultipleApi {
26
- }
27
- /** These assertions compile in package builds, unlike transpiled-only spec files. Never invoked. */
28
- class IpcCompileAssertions {
29
- // webpieces-disable no-function-outside-class -- portable stateless IPC primitive; no platform DI container exists on this boundary
30
- static assertExhaustiveMetadata() {
31
- // @ts-expect-error every API member needs explicit runtime metadata
32
- new IpcContract_1.IpcContract('incomplete', Api, new Incomplete());
33
- // @ts-expect-error multi-argument API methods are not IPC DTO contracts
34
- const multiple = new Incomplete();
35
- void multiple;
36
- }
37
- }
38
- exports.IpcCompileAssertions = IpcCompileAssertions;
39
- //# sourceMappingURL=IpcCompileAssertions.js.map