@databricks/appkit 0.37.0 → 0.38.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/CLAUDE.md +3 -2
  2. package/NOTICE.md +1 -2
  3. package/dist/appkit/package.js +1 -1
  4. package/dist/cache/index.d.ts +27 -5
  5. package/dist/cache/index.d.ts.map +1 -1
  6. package/dist/cache/index.js +88 -16
  7. package/dist/cache/index.js.map +1 -1
  8. package/dist/cache/storage/persistent.js +1 -2
  9. package/dist/cache/storage/persistent.js.map +1 -1
  10. package/dist/cli/commands/plugin/add-resource/add-resource.js.map +1 -1
  11. package/dist/cli/commands/plugin/create/resource-defaults.js +2 -1
  12. package/dist/cli/commands/plugin/create/resource-defaults.js.map +1 -1
  13. package/dist/cli/commands/plugin/schema-resources.js +34 -51
  14. package/dist/cli/commands/plugin/schema-resources.js.map +1 -1
  15. package/dist/cli/commands/plugin/sync/sync.js +20 -6
  16. package/dist/cli/commands/plugin/sync/sync.js.map +1 -1
  17. package/dist/cli/commands/plugin/validate/validate-manifest.js +71 -157
  18. package/dist/cli/commands/plugin/validate/validate-manifest.js.map +1 -1
  19. package/dist/cli/commands/plugin/validate/validate.js +2 -2
  20. package/dist/cli/commands/plugin/validate/validate.js.map +1 -1
  21. package/dist/cli/commands/setup.js +2 -2
  22. package/dist/cli/commands/setup.js.map +1 -1
  23. package/dist/connectors/index.js +0 -1
  24. package/dist/connectors/jobs/client.js +1 -2
  25. package/dist/connectors/jobs/client.js.map +1 -1
  26. package/dist/connectors/lakebase/routing-pool.js +1 -2
  27. package/dist/connectors/lakebase/routing-pool.js.map +1 -1
  28. package/dist/connectors/sql-warehouse/client.js +1 -2
  29. package/dist/connectors/sql-warehouse/client.js.map +1 -1
  30. package/dist/context/execution-context.js +9 -13
  31. package/dist/context/execution-context.js.map +1 -1
  32. package/dist/context/index.js +3 -13
  33. package/dist/context/service-context.js +137 -136
  34. package/dist/context/service-context.js.map +1 -1
  35. package/dist/context/user-context.js +1 -5
  36. package/dist/context/user-context.js.map +1 -1
  37. package/dist/core/agent/create-agent.js +1 -2
  38. package/dist/core/agent/create-agent.js.map +1 -1
  39. package/dist/core/appkit.js +1 -2
  40. package/dist/core/appkit.js.map +1 -1
  41. package/dist/errors/authentication.js +44 -40
  42. package/dist/errors/authentication.js.map +1 -1
  43. package/dist/errors/base.js +86 -70
  44. package/dist/errors/base.js.map +1 -1
  45. package/dist/errors/configuration.js +70 -66
  46. package/dist/errors/configuration.js.map +1 -1
  47. package/dist/errors/connection.js +50 -46
  48. package/dist/errors/connection.js.map +1 -1
  49. package/dist/errors/execution.js +47 -43
  50. package/dist/errors/execution.js.map +1 -1
  51. package/dist/errors/index.js +10 -27
  52. package/dist/errors/initialization.js +38 -34
  53. package/dist/errors/initialization.js.map +1 -1
  54. package/dist/errors/server.js +34 -31
  55. package/dist/errors/server.js.map +1 -1
  56. package/dist/errors/tunnel.js +47 -43
  57. package/dist/errors/tunnel.js.map +1 -1
  58. package/dist/errors/validation.js +41 -37
  59. package/dist/errors/validation.js.map +1 -1
  60. package/dist/index.d.ts +1 -1
  61. package/dist/index.js +3 -9
  62. package/dist/plugin/dev-reader.js +1 -2
  63. package/dist/plugin/dev-reader.js.map +1 -1
  64. package/dist/plugin/interceptors/cache.js +13 -1
  65. package/dist/plugin/interceptors/cache.js.map +1 -1
  66. package/dist/plugin/interceptors/retry.js +1 -2
  67. package/dist/plugin/interceptors/retry.js.map +1 -1
  68. package/dist/plugin/interceptors/telemetry.js +1 -2
  69. package/dist/plugin/interceptors/telemetry.js.map +1 -1
  70. package/dist/plugin/plugin.js +2 -4
  71. package/dist/plugin/plugin.js.map +1 -1
  72. package/dist/plugins/analytics/analytics.js +1 -2
  73. package/dist/plugins/analytics/analytics.js.map +1 -1
  74. package/dist/plugins/analytics/manifest.js +9 -1
  75. package/dist/plugins/analytics/query.js +2 -4
  76. package/dist/plugins/analytics/query.js.map +1 -1
  77. package/dist/plugins/files/manifest.js +7 -1
  78. package/dist/plugins/files/plugin.js +3 -6
  79. package/dist/plugins/files/plugin.js.map +1 -1
  80. package/dist/plugins/genie/genie.js +1 -2
  81. package/dist/plugins/genie/genie.js.map +1 -1
  82. package/dist/plugins/genie/manifest.js +7 -1
  83. package/dist/plugins/jobs/plugin.js +2 -4
  84. package/dist/plugins/jobs/plugin.js.map +1 -1
  85. package/dist/plugins/lakebase/lakebase.js +1 -2
  86. package/dist/plugins/lakebase/lakebase.js.map +1 -1
  87. package/dist/plugins/lakebase/manifest.js +26 -4
  88. package/dist/plugins/server/index.js +1 -2
  89. package/dist/plugins/server/index.js.map +1 -1
  90. package/dist/plugins/server/vite-dev-server.js +1 -2
  91. package/dist/plugins/server/vite-dev-server.js.map +1 -1
  92. package/dist/plugins/serving/serving.js +1 -2
  93. package/dist/plugins/serving/serving.js.map +1 -1
  94. package/dist/registry/index.d.ts +1 -1
  95. package/dist/registry/manifest-loader.d.ts +4 -4
  96. package/dist/registry/manifest-loader.d.ts.map +1 -1
  97. package/dist/registry/manifest-loader.js +1 -2
  98. package/dist/registry/manifest-loader.js.map +1 -1
  99. package/dist/registry/resource-registry.js +1 -2
  100. package/dist/registry/resource-registry.js.map +1 -1
  101. package/dist/registry/types.d.ts +21 -7
  102. package/dist/registry/types.d.ts.map +1 -1
  103. package/dist/registry/types.generated.d.ts +1 -1
  104. package/dist/registry/types.generated.js +1 -1
  105. package/dist/registry/types.generated.js.map +1 -1
  106. package/dist/registry/types.js +3 -3
  107. package/dist/registry/types.js.map +1 -1
  108. package/dist/schemas/manifest.d.ts +1139 -0
  109. package/dist/schemas/manifest.d.ts.map +1 -0
  110. package/dist/schemas/manifest.js +524 -0
  111. package/dist/schemas/manifest.js.map +1 -0
  112. package/dist/shared/src/index.d.ts +1 -1
  113. package/dist/shared/src/plugin.d.ts +38 -7
  114. package/dist/shared/src/plugin.d.ts.map +1 -1
  115. package/dist/shared/src/schemas/manifest.d.ts +1110 -0
  116. package/dist/shared/src/schemas/manifest.d.ts.map +1 -0
  117. package/dist/stream/arrow-stream-processor.js +1 -2
  118. package/dist/stream/arrow-stream-processor.js.map +1 -1
  119. package/dist/stream/buffers.js +1 -2
  120. package/dist/stream/buffers.js.map +1 -1
  121. package/dist/stream/stream-manager.d.ts.map +1 -1
  122. package/dist/stream/stream-manager.js +3 -3
  123. package/dist/stream/stream-manager.js.map +1 -1
  124. package/docs/api/appkit/Enumeration.ResourceType.md +1 -1
  125. package/docs/api/appkit/Interface.PluginManifest.md +57 -3
  126. package/docs/api/appkit/Interface.ResourceEntry.md +6 -4
  127. package/docs/api/appkit/Interface.ResourceRequirement.md +7 -61
  128. package/docs/api/appkit/TypeAlias.ResourceFieldEntry.md +6 -0
  129. package/docs/api/appkit.md +6 -6
  130. package/docs/app-management.md +1 -1
  131. package/docs/development/ai-assisted-development.md +2 -2
  132. package/docs/development/local-development.md +1 -1
  133. package/docs/development/remote-bridge.md +1 -1
  134. package/docs/development/templates.md +118 -12
  135. package/docs/development.md +1 -1
  136. package/docs/plugins/custom-plugins.md +33 -23
  137. package/docs/plugins/lakebase.md +1 -1
  138. package/docs/plugins/manifest.md +293 -0
  139. package/docs.md +2 -2
  140. package/llms.txt +3 -2
  141. package/package.json +3 -3
  142. package/sbom.cdx.json +1 -1
  143. package/dist/_virtual/_rolldown/runtime.js +0 -7
  144. package/dist/connectors/lakebase-v1/client.js +0 -15
  145. package/dist/connectors/lakebase-v1/client.js.map +0 -1
  146. package/dist/connectors/lakebase-v1/index.js +0 -3
  147. package/dist/context/index.js.map +0 -1
  148. package/dist/errors/index.js.map +0 -1
  149. package/dist/index.js.map +0 -1
  150. package/dist/schemas/plugin-manifest.generated.d.ts +0 -182
  151. package/dist/schemas/plugin-manifest.generated.d.ts.map +0 -1
  152. package/dist/schemas/plugin-manifest.schema.json +0 -489
  153. package/dist/schemas/template-plugins.schema.json +0 -113
  154. package/dist/shared/src/schemas/plugin-manifest.generated.d.ts +0 -182
  155. package/dist/shared/src/schemas/plugin-manifest.generated.d.ts.map +0 -1
  156. package/docs/api/appkit/Interface.ResourceFieldEntry.md +0 -82
@@ -1,51 +1,55 @@
1
- import { __esmMin } from "../_virtual/_rolldown/runtime.js";
2
- import { AppKitError, init_base } from "./base.js";
1
+ import { AppKitError } from "./base.js";
3
2
 
4
3
  //#region src/errors/connection.ts
5
- var ConnectionError;
6
- var init_connection = __esmMin((() => {
7
- init_base();
8
- ConnectionError = class ConnectionError extends AppKitError {
9
- code = "CONNECTION_ERROR";
10
- statusCode = 503;
11
- isRetryable = true;
12
- /**
13
- * Create a connection error for query failure
14
- */
15
- static queryFailed(cause) {
16
- return new ConnectionError("Query failed", { cause });
17
- }
18
- /**
19
- * Create a connection error for transaction failure
20
- */
21
- static transactionFailed(cause) {
22
- return new ConnectionError("Transaction failed", { cause });
23
- }
24
- /**
25
- * Create a connection error for pool errors
26
- */
27
- static poolError(operation, cause) {
28
- return new ConnectionError(`Connection pool error: ${operation}`, { cause });
29
- }
30
- /**
31
- * Create a connection error for API failures
32
- */
33
- static apiFailure(service, cause) {
34
- return new ConnectionError(`No response received from ${service} API`, {
35
- cause,
36
- context: { service }
37
- });
38
- }
39
- /**
40
- * Create a connection error for client unavailable
41
- */
42
- static clientUnavailable(clientType, hint) {
43
- return new ConnectionError(hint ? `${clientType} not available. ${hint}` : `${clientType} not available`, { context: { clientType } });
44
- }
45
- };
46
- }));
4
+ /**
5
+ * Error thrown when a connection or network operation fails.
6
+ * Use for database pool errors, API failures, timeouts, etc.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * throw new ConnectionError("Query failed", { cause: pgError });
11
+ * throw new ConnectionError("No response received from SQL Warehouse API");
12
+ * ```
13
+ */
14
+ var ConnectionError = class ConnectionError extends AppKitError {
15
+ code = "CONNECTION_ERROR";
16
+ statusCode = 503;
17
+ isRetryable = true;
18
+ /**
19
+ * Create a connection error for query failure
20
+ */
21
+ static queryFailed(cause) {
22
+ return new ConnectionError("Query failed", { cause });
23
+ }
24
+ /**
25
+ * Create a connection error for transaction failure
26
+ */
27
+ static transactionFailed(cause) {
28
+ return new ConnectionError("Transaction failed", { cause });
29
+ }
30
+ /**
31
+ * Create a connection error for pool errors
32
+ */
33
+ static poolError(operation, cause) {
34
+ return new ConnectionError(`Connection pool error: ${operation}`, { cause });
35
+ }
36
+ /**
37
+ * Create a connection error for API failures
38
+ */
39
+ static apiFailure(service, cause) {
40
+ return new ConnectionError(`No response received from ${service} API`, {
41
+ cause,
42
+ context: { service }
43
+ });
44
+ }
45
+ /**
46
+ * Create a connection error for client unavailable
47
+ */
48
+ static clientUnavailable(clientType, hint) {
49
+ return new ConnectionError(hint ? `${clientType} not available. ${hint}` : `${clientType} not available`, { context: { clientType } });
50
+ }
51
+ };
47
52
 
48
53
  //#endregion
49
- init_connection();
50
- export { ConnectionError, init_connection };
54
+ export { ConnectionError };
51
55
  //# sourceMappingURL=connection.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"connection.js","names":[],"sources":["../../src/errors/connection.ts"],"sourcesContent":["import { AppKitError } from \"./base\";\n\n/**\n * Error thrown when a connection or network operation fails.\n * Use for database pool errors, API failures, timeouts, etc.\n *\n * @example\n * ```typescript\n * throw new ConnectionError(\"Query failed\", { cause: pgError });\n * throw new ConnectionError(\"No response received from SQL Warehouse API\");\n * ```\n */\nexport class ConnectionError extends AppKitError {\n readonly code = \"CONNECTION_ERROR\";\n readonly statusCode = 503;\n readonly isRetryable = true;\n\n /**\n * Create a connection error for query failure\n */\n static queryFailed(cause?: Error): ConnectionError {\n return new ConnectionError(\"Query failed\", { cause });\n }\n\n /**\n * Create a connection error for transaction failure\n */\n static transactionFailed(cause?: Error): ConnectionError {\n return new ConnectionError(\"Transaction failed\", { cause });\n }\n\n /**\n * Create a connection error for pool errors\n */\n static poolError(operation: string, cause?: Error): ConnectionError {\n return new ConnectionError(`Connection pool error: ${operation}`, {\n cause,\n });\n }\n\n /**\n * Create a connection error for API failures\n */\n static apiFailure(service: string, cause?: Error): ConnectionError {\n return new ConnectionError(`No response received from ${service} API`, {\n cause,\n context: { service },\n });\n }\n\n /**\n * Create a connection error for client unavailable\n */\n static clientUnavailable(clientType: string, hint?: string): ConnectionError {\n const message = hint\n ? `${clientType} not available. ${hint}`\n : `${clientType} not available`;\n return new ConnectionError(message, { context: { clientType } });\n }\n}\n"],"mappings":";;;;;;YAAqC;CAYxB,kBAAb,MAAa,wBAAwB,YAAY;EAC/C,AAAS,OAAO;EAChB,AAAS,aAAa;EACtB,AAAS,cAAc;;;;EAKvB,OAAO,YAAY,OAAgC;AACjD,UAAO,IAAI,gBAAgB,gBAAgB,EAAE,OAAO,CAAC;;;;;EAMvD,OAAO,kBAAkB,OAAgC;AACvD,UAAO,IAAI,gBAAgB,sBAAsB,EAAE,OAAO,CAAC;;;;;EAM7D,OAAO,UAAU,WAAmB,OAAgC;AAClE,UAAO,IAAI,gBAAgB,0BAA0B,aAAa,EAChE,OACD,CAAC;;;;;EAMJ,OAAO,WAAW,SAAiB,OAAgC;AACjE,UAAO,IAAI,gBAAgB,6BAA6B,QAAQ,OAAO;IACrE;IACA,SAAS,EAAE,SAAS;IACrB,CAAC;;;;;EAMJ,OAAO,kBAAkB,YAAoB,MAAgC;AAI3E,UAAO,IAAI,gBAHK,OACZ,GAAG,WAAW,kBAAkB,SAChC,GAAG,WAAW,iBACkB,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"connection.js","names":[],"sources":["../../src/errors/connection.ts"],"sourcesContent":["import { AppKitError } from \"./base\";\n\n/**\n * Error thrown when a connection or network operation fails.\n * Use for database pool errors, API failures, timeouts, etc.\n *\n * @example\n * ```typescript\n * throw new ConnectionError(\"Query failed\", { cause: pgError });\n * throw new ConnectionError(\"No response received from SQL Warehouse API\");\n * ```\n */\nexport class ConnectionError extends AppKitError {\n readonly code = \"CONNECTION_ERROR\";\n readonly statusCode = 503;\n readonly isRetryable = true;\n\n /**\n * Create a connection error for query failure\n */\n static queryFailed(cause?: Error): ConnectionError {\n return new ConnectionError(\"Query failed\", { cause });\n }\n\n /**\n * Create a connection error for transaction failure\n */\n static transactionFailed(cause?: Error): ConnectionError {\n return new ConnectionError(\"Transaction failed\", { cause });\n }\n\n /**\n * Create a connection error for pool errors\n */\n static poolError(operation: string, cause?: Error): ConnectionError {\n return new ConnectionError(`Connection pool error: ${operation}`, {\n cause,\n });\n }\n\n /**\n * Create a connection error for API failures\n */\n static apiFailure(service: string, cause?: Error): ConnectionError {\n return new ConnectionError(`No response received from ${service} API`, {\n cause,\n context: { service },\n });\n }\n\n /**\n * Create a connection error for client unavailable\n */\n static clientUnavailable(clientType: string, hint?: string): ConnectionError {\n const message = hint\n ? `${clientType} not available. ${hint}`\n : `${clientType} not available`;\n return new ConnectionError(message, { context: { clientType } });\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAYA,IAAa,kBAAb,MAAa,wBAAwB,YAAY;CAC/C,AAAS,OAAO;CAChB,AAAS,aAAa;CACtB,AAAS,cAAc;;;;CAKvB,OAAO,YAAY,OAAgC;AACjD,SAAO,IAAI,gBAAgB,gBAAgB,EAAE,OAAO,CAAC;;;;;CAMvD,OAAO,kBAAkB,OAAgC;AACvD,SAAO,IAAI,gBAAgB,sBAAsB,EAAE,OAAO,CAAC;;;;;CAM7D,OAAO,UAAU,WAAmB,OAAgC;AAClE,SAAO,IAAI,gBAAgB,0BAA0B,aAAa,EAChE,OACD,CAAC;;;;;CAMJ,OAAO,WAAW,SAAiB,OAAgC;AACjE,SAAO,IAAI,gBAAgB,6BAA6B,QAAQ,OAAO;GACrE;GACA,SAAS,EAAE,SAAS;GACrB,CAAC;;;;;CAMJ,OAAO,kBAAkB,YAAoB,MAAgC;AAI3E,SAAO,IAAI,gBAHK,OACZ,GAAG,WAAW,kBAAkB,SAChC,GAAG,WAAW,iBACkB,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC"}
@@ -1,48 +1,52 @@
1
- import { __esmMin } from "../_virtual/_rolldown/runtime.js";
2
- import { AppKitError, init_base } from "./base.js";
1
+ import { AppKitError } from "./base.js";
3
2
 
4
3
  //#region src/errors/execution.ts
5
- var ExecutionError;
6
- var init_execution = __esmMin((() => {
7
- init_base();
8
- ExecutionError = class ExecutionError extends AppKitError {
9
- code = "EXECUTION_ERROR";
10
- statusCode = 500;
11
- isRetryable = false;
12
- /**
13
- * Create an execution error for statement failure
14
- */
15
- static statementFailed(errorMessage) {
16
- return new ExecutionError(errorMessage ? `Statement failed: ${errorMessage}` : "Statement failed: Unknown error");
17
- }
18
- /**
19
- * Create an execution error for canceled operation
20
- */
21
- static canceled() {
22
- return new ExecutionError("Statement was canceled");
23
- }
24
- /**
25
- * Create an execution error for closed/expired results
26
- */
27
- static resultsClosed() {
28
- return new ExecutionError("Statement execution completed but results are no longer available (CLOSED state)");
29
- }
30
- /**
31
- * Create an execution error for unknown state
32
- */
33
- static unknownState(state) {
34
- return new ExecutionError(`Unknown statement state: ${state}`, { context: { state } });
35
- }
36
- /**
37
- * Create an execution error for missing data
38
- */
39
- static missingData(dataType) {
40
- return new ExecutionError(`No ${dataType} found in response`, { context: { dataType } });
41
- }
42
- };
43
- }));
4
+ /**
5
+ * Error thrown when an operation execution fails.
6
+ * Use for statement failures, canceled operations, or unexpected states.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * throw new ExecutionError("Statement failed: syntax error");
11
+ * throw new ExecutionError("Statement was canceled");
12
+ * ```
13
+ */
14
+ var ExecutionError = class ExecutionError extends AppKitError {
15
+ code = "EXECUTION_ERROR";
16
+ statusCode = 500;
17
+ isRetryable = false;
18
+ /**
19
+ * Create an execution error for statement failure
20
+ */
21
+ static statementFailed(errorMessage) {
22
+ return new ExecutionError(errorMessage ? `Statement failed: ${errorMessage}` : "Statement failed: Unknown error");
23
+ }
24
+ /**
25
+ * Create an execution error for canceled operation
26
+ */
27
+ static canceled() {
28
+ return new ExecutionError("Statement was canceled");
29
+ }
30
+ /**
31
+ * Create an execution error for closed/expired results
32
+ */
33
+ static resultsClosed() {
34
+ return new ExecutionError("Statement execution completed but results are no longer available (CLOSED state)");
35
+ }
36
+ /**
37
+ * Create an execution error for unknown state
38
+ */
39
+ static unknownState(state) {
40
+ return new ExecutionError(`Unknown statement state: ${state}`, { context: { state } });
41
+ }
42
+ /**
43
+ * Create an execution error for missing data
44
+ */
45
+ static missingData(dataType) {
46
+ return new ExecutionError(`No ${dataType} found in response`, { context: { dataType } });
47
+ }
48
+ };
44
49
 
45
50
  //#endregion
46
- init_execution();
47
- export { ExecutionError, init_execution };
51
+ export { ExecutionError };
48
52
  //# sourceMappingURL=execution.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"execution.js","names":[],"sources":["../../src/errors/execution.ts"],"sourcesContent":["import { AppKitError } from \"./base\";\n\n/**\n * Error thrown when an operation execution fails.\n * Use for statement failures, canceled operations, or unexpected states.\n *\n * @example\n * ```typescript\n * throw new ExecutionError(\"Statement failed: syntax error\");\n * throw new ExecutionError(\"Statement was canceled\");\n * ```\n */\nexport class ExecutionError extends AppKitError {\n readonly code = \"EXECUTION_ERROR\";\n readonly statusCode = 500;\n readonly isRetryable = false;\n\n /**\n * Create an execution error for statement failure\n */\n static statementFailed(errorMessage?: string): ExecutionError {\n const message = errorMessage\n ? `Statement failed: ${errorMessage}`\n : \"Statement failed: Unknown error\";\n return new ExecutionError(message);\n }\n\n /**\n * Create an execution error for canceled operation\n */\n static canceled(): ExecutionError {\n return new ExecutionError(\"Statement was canceled\");\n }\n\n /**\n * Create an execution error for closed/expired results\n */\n static resultsClosed(): ExecutionError {\n return new ExecutionError(\n \"Statement execution completed but results are no longer available (CLOSED state)\",\n );\n }\n\n /**\n * Create an execution error for unknown state\n */\n static unknownState(state: string): ExecutionError {\n return new ExecutionError(`Unknown statement state: ${state}`, {\n context: { state },\n });\n }\n\n /**\n * Create an execution error for missing data\n */\n static missingData(dataType: string): ExecutionError {\n return new ExecutionError(`No ${dataType} found in response`, {\n context: { dataType },\n });\n }\n}\n"],"mappings":";;;;;;YAAqC;CAYxB,iBAAb,MAAa,uBAAuB,YAAY;EAC9C,AAAS,OAAO;EAChB,AAAS,aAAa;EACtB,AAAS,cAAc;;;;EAKvB,OAAO,gBAAgB,cAAuC;AAI5D,UAAO,IAAI,eAHK,eACZ,qBAAqB,iBACrB,kCAC8B;;;;;EAMpC,OAAO,WAA2B;AAChC,UAAO,IAAI,eAAe,yBAAyB;;;;;EAMrD,OAAO,gBAAgC;AACrC,UAAO,IAAI,eACT,mFACD;;;;;EAMH,OAAO,aAAa,OAA+B;AACjD,UAAO,IAAI,eAAe,4BAA4B,SAAS,EAC7D,SAAS,EAAE,OAAO,EACnB,CAAC;;;;;EAMJ,OAAO,YAAY,UAAkC;AACnD,UAAO,IAAI,eAAe,MAAM,SAAS,qBAAqB,EAC5D,SAAS,EAAE,UAAU,EACtB,CAAC"}
1
+ {"version":3,"file":"execution.js","names":[],"sources":["../../src/errors/execution.ts"],"sourcesContent":["import { AppKitError } from \"./base\";\n\n/**\n * Error thrown when an operation execution fails.\n * Use for statement failures, canceled operations, or unexpected states.\n *\n * @example\n * ```typescript\n * throw new ExecutionError(\"Statement failed: syntax error\");\n * throw new ExecutionError(\"Statement was canceled\");\n * ```\n */\nexport class ExecutionError extends AppKitError {\n readonly code = \"EXECUTION_ERROR\";\n readonly statusCode = 500;\n readonly isRetryable = false;\n\n /**\n * Create an execution error for statement failure\n */\n static statementFailed(errorMessage?: string): ExecutionError {\n const message = errorMessage\n ? `Statement failed: ${errorMessage}`\n : \"Statement failed: Unknown error\";\n return new ExecutionError(message);\n }\n\n /**\n * Create an execution error for canceled operation\n */\n static canceled(): ExecutionError {\n return new ExecutionError(\"Statement was canceled\");\n }\n\n /**\n * Create an execution error for closed/expired results\n */\n static resultsClosed(): ExecutionError {\n return new ExecutionError(\n \"Statement execution completed but results are no longer available (CLOSED state)\",\n );\n }\n\n /**\n * Create an execution error for unknown state\n */\n static unknownState(state: string): ExecutionError {\n return new ExecutionError(`Unknown statement state: ${state}`, {\n context: { state },\n });\n }\n\n /**\n * Create an execution error for missing data\n */\n static missingData(dataType: string): ExecutionError {\n return new ExecutionError(`No ${dataType} found in response`, {\n context: { dataType },\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAYA,IAAa,iBAAb,MAAa,uBAAuB,YAAY;CAC9C,AAAS,OAAO;CAChB,AAAS,aAAa;CACtB,AAAS,cAAc;;;;CAKvB,OAAO,gBAAgB,cAAuC;AAI5D,SAAO,IAAI,eAHK,eACZ,qBAAqB,iBACrB,kCAC8B;;;;;CAMpC,OAAO,WAA2B;AAChC,SAAO,IAAI,eAAe,yBAAyB;;;;;CAMrD,OAAO,gBAAgC;AACrC,SAAO,IAAI,eACT,mFACD;;;;;CAMH,OAAO,aAAa,OAA+B;AACjD,SAAO,IAAI,eAAe,4BAA4B,SAAS,EAC7D,SAAS,EAAE,OAAO,EACnB,CAAC;;;;;CAMJ,OAAO,YAAY,UAAkC;AACnD,SAAO,IAAI,eAAe,MAAM,SAAS,qBAAqB,EAC5D,SAAS,EAAE,UAAU,EACtB,CAAC"}
@@ -1,28 +1,11 @@
1
- import { __esmMin } from "../_virtual/_rolldown/runtime.js";
2
- import { AppKitError, init_base } from "./base.js";
3
- import { AuthenticationError, init_authentication } from "./authentication.js";
4
- import { ConfigurationError, init_configuration } from "./configuration.js";
5
- import { ConnectionError, init_connection } from "./connection.js";
6
- import { ExecutionError, init_execution } from "./execution.js";
7
- import { InitializationError, init_initialization } from "./initialization.js";
8
- import { ServerError, init_server } from "./server.js";
9
- import { TunnelError, init_tunnel } from "./tunnel.js";
10
- import { ValidationError, init_validation } from "./validation.js";
1
+ import { AppKitError } from "./base.js";
2
+ import { AuthenticationError } from "./authentication.js";
3
+ import { ConfigurationError } from "./configuration.js";
4
+ import { ConnectionError } from "./connection.js";
5
+ import { ExecutionError } from "./execution.js";
6
+ import { InitializationError } from "./initialization.js";
7
+ import { ServerError } from "./server.js";
8
+ import { TunnelError } from "./tunnel.js";
9
+ import { ValidationError } from "./validation.js";
11
10
 
12
- //#region src/errors/index.ts
13
- var init_errors = __esmMin((() => {
14
- init_authentication();
15
- init_base();
16
- init_configuration();
17
- init_connection();
18
- init_execution();
19
- init_initialization();
20
- init_server();
21
- init_tunnel();
22
- init_validation();
23
- }));
24
-
25
- //#endregion
26
- init_errors();
27
- export { init_errors };
28
- //# sourceMappingURL=index.js.map
11
+ export { };
@@ -1,39 +1,43 @@
1
- import { __esmMin } from "../_virtual/_rolldown/runtime.js";
2
- import { AppKitError, init_base } from "./base.js";
1
+ import { AppKitError } from "./base.js";
3
2
 
4
3
  //#region src/errors/initialization.ts
5
- var InitializationError;
6
- var init_initialization = __esmMin((() => {
7
- init_base();
8
- InitializationError = class InitializationError extends AppKitError {
9
- code = "INITIALIZATION_ERROR";
10
- statusCode = 500;
11
- isRetryable = true;
12
- /**
13
- * Create an initialization error for a service that is not ready
14
- */
15
- static notInitialized(serviceName, hint) {
16
- return new InitializationError(hint ? `${serviceName} not initialized. ${hint}` : `${serviceName} not initialized`, { context: { service: serviceName } });
17
- }
18
- /**
19
- * Create an initialization error for setup failure
20
- */
21
- static setupFailed(component, cause) {
22
- return new InitializationError(`Failed to initialize ${component}`, {
23
- cause,
24
- context: { component }
25
- });
26
- }
27
- /**
28
- * Create an initialization error for migration failure
29
- */
30
- static migrationFailed(cause) {
31
- return new InitializationError("Error in running migrations for persistent storage", { cause });
32
- }
33
- };
34
- }));
4
+ /**
5
+ * Error thrown when a service or component is not properly initialized.
6
+ * Use when accessing services before they are ready.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * throw new InitializationError("CacheManager not initialized");
11
+ * throw new InitializationError("ServiceContext not initialized. Call ServiceContext.initialize() first.");
12
+ * ```
13
+ */
14
+ var InitializationError = class InitializationError extends AppKitError {
15
+ code = "INITIALIZATION_ERROR";
16
+ statusCode = 500;
17
+ isRetryable = true;
18
+ /**
19
+ * Create an initialization error for a service that is not ready
20
+ */
21
+ static notInitialized(serviceName, hint) {
22
+ return new InitializationError(hint ? `${serviceName} not initialized. ${hint}` : `${serviceName} not initialized`, { context: { service: serviceName } });
23
+ }
24
+ /**
25
+ * Create an initialization error for setup failure
26
+ */
27
+ static setupFailed(component, cause) {
28
+ return new InitializationError(`Failed to initialize ${component}`, {
29
+ cause,
30
+ context: { component }
31
+ });
32
+ }
33
+ /**
34
+ * Create an initialization error for migration failure
35
+ */
36
+ static migrationFailed(cause) {
37
+ return new InitializationError("Error in running migrations for persistent storage", { cause });
38
+ }
39
+ };
35
40
 
36
41
  //#endregion
37
- init_initialization();
38
- export { InitializationError, init_initialization };
42
+ export { InitializationError };
39
43
  //# sourceMappingURL=initialization.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"initialization.js","names":[],"sources":["../../src/errors/initialization.ts"],"sourcesContent":["import { AppKitError } from \"./base\";\n\n/**\n * Error thrown when a service or component is not properly initialized.\n * Use when accessing services before they are ready.\n *\n * @example\n * ```typescript\n * throw new InitializationError(\"CacheManager not initialized\");\n * throw new InitializationError(\"ServiceContext not initialized. Call ServiceContext.initialize() first.\");\n * ```\n */\nexport class InitializationError extends AppKitError {\n readonly code = \"INITIALIZATION_ERROR\";\n readonly statusCode = 500;\n readonly isRetryable = true;\n\n /**\n * Create an initialization error for a service that is not ready\n */\n static notInitialized(\n serviceName: string,\n hint?: string,\n ): InitializationError {\n const message = hint\n ? `${serviceName} not initialized. ${hint}`\n : `${serviceName} not initialized`;\n return new InitializationError(message, {\n context: { service: serviceName },\n });\n }\n\n /**\n * Create an initialization error for setup failure\n */\n static setupFailed(component: string, cause?: Error): InitializationError {\n return new InitializationError(`Failed to initialize ${component}`, {\n cause,\n context: { component },\n });\n }\n\n /**\n * Create an initialization error for migration failure\n */\n static migrationFailed(cause?: Error): InitializationError {\n return new InitializationError(\n \"Error in running migrations for persistent storage\",\n { cause },\n );\n }\n}\n"],"mappings":";;;;;;YAAqC;CAYxB,sBAAb,MAAa,4BAA4B,YAAY;EACnD,AAAS,OAAO;EAChB,AAAS,aAAa;EACtB,AAAS,cAAc;;;;EAKvB,OAAO,eACL,aACA,MACqB;AAIrB,UAAO,IAAI,oBAHK,OACZ,GAAG,YAAY,oBAAoB,SACnC,GAAG,YAAY,mBACqB,EACtC,SAAS,EAAE,SAAS,aAAa,EAClC,CAAC;;;;;EAMJ,OAAO,YAAY,WAAmB,OAAoC;AACxE,UAAO,IAAI,oBAAoB,wBAAwB,aAAa;IAClE;IACA,SAAS,EAAE,WAAW;IACvB,CAAC;;;;;EAMJ,OAAO,gBAAgB,OAAoC;AACzD,UAAO,IAAI,oBACT,sDACA,EAAE,OAAO,CACV"}
1
+ {"version":3,"file":"initialization.js","names":[],"sources":["../../src/errors/initialization.ts"],"sourcesContent":["import { AppKitError } from \"./base\";\n\n/**\n * Error thrown when a service or component is not properly initialized.\n * Use when accessing services before they are ready.\n *\n * @example\n * ```typescript\n * throw new InitializationError(\"CacheManager not initialized\");\n * throw new InitializationError(\"ServiceContext not initialized. Call ServiceContext.initialize() first.\");\n * ```\n */\nexport class InitializationError extends AppKitError {\n readonly code = \"INITIALIZATION_ERROR\";\n readonly statusCode = 500;\n readonly isRetryable = true;\n\n /**\n * Create an initialization error for a service that is not ready\n */\n static notInitialized(\n serviceName: string,\n hint?: string,\n ): InitializationError {\n const message = hint\n ? `${serviceName} not initialized. ${hint}`\n : `${serviceName} not initialized`;\n return new InitializationError(message, {\n context: { service: serviceName },\n });\n }\n\n /**\n * Create an initialization error for setup failure\n */\n static setupFailed(component: string, cause?: Error): InitializationError {\n return new InitializationError(`Failed to initialize ${component}`, {\n cause,\n context: { component },\n });\n }\n\n /**\n * Create an initialization error for migration failure\n */\n static migrationFailed(cause?: Error): InitializationError {\n return new InitializationError(\n \"Error in running migrations for persistent storage\",\n { cause },\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAYA,IAAa,sBAAb,MAAa,4BAA4B,YAAY;CACnD,AAAS,OAAO;CAChB,AAAS,aAAa;CACtB,AAAS,cAAc;;;;CAKvB,OAAO,eACL,aACA,MACqB;AAIrB,SAAO,IAAI,oBAHK,OACZ,GAAG,YAAY,oBAAoB,SACnC,GAAG,YAAY,mBACqB,EACtC,SAAS,EAAE,SAAS,aAAa,EAClC,CAAC;;;;;CAMJ,OAAO,YAAY,WAAmB,OAAoC;AACxE,SAAO,IAAI,oBAAoB,wBAAwB,aAAa;GAClE;GACA,SAAS,EAAE,WAAW;GACvB,CAAC;;;;;CAMJ,OAAO,gBAAgB,OAAoC;AACzD,SAAO,IAAI,oBACT,sDACA,EAAE,OAAO,CACV"}
@@ -1,36 +1,39 @@
1
- import { __esmMin } from "../_virtual/_rolldown/runtime.js";
2
- import { AppKitError, init_base } from "./base.js";
1
+ import { AppKitError } from "./base.js";
3
2
 
4
3
  //#region src/errors/server.ts
5
- var ServerError;
6
- var init_server = __esmMin((() => {
7
- init_base();
8
- ServerError = class ServerError extends AppKitError {
9
- code = "SERVER_ERROR";
10
- statusCode = 500;
11
- isRetryable = false;
12
- /**
13
- * Create a server error for server not started
14
- */
15
- static notStarted() {
16
- return new ServerError("Server not started. Please start the server first by calling the start() method");
17
- }
18
- /**
19
- * Create a server error for Vite dev server not initialized
20
- */
21
- static viteNotInitialized() {
22
- return new ServerError("Vite dev server not initialized");
23
- }
24
- /**
25
- * Create a server error for missing client directory
26
- */
27
- static clientDirectoryNotFound(searchedPaths) {
28
- return new ServerError(`Could not find client directory. Searched for vite.config.ts/js + index.html in: ${searchedPaths.join(", ")}`, { context: { searchedPaths } });
29
- }
30
- };
31
- }));
4
+ /**
5
+ * Error thrown when server lifecycle operations fail.
6
+ * Use for server start/stop issues, configuration conflicts, etc.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * throw new ServerError("Server not started");
11
+ * ```
12
+ */
13
+ var ServerError = class ServerError extends AppKitError {
14
+ code = "SERVER_ERROR";
15
+ statusCode = 500;
16
+ isRetryable = false;
17
+ /**
18
+ * Create a server error for server not started
19
+ */
20
+ static notStarted() {
21
+ return new ServerError("Server not started. Please start the server first by calling the start() method");
22
+ }
23
+ /**
24
+ * Create a server error for Vite dev server not initialized
25
+ */
26
+ static viteNotInitialized() {
27
+ return new ServerError("Vite dev server not initialized");
28
+ }
29
+ /**
30
+ * Create a server error for missing client directory
31
+ */
32
+ static clientDirectoryNotFound(searchedPaths) {
33
+ return new ServerError(`Could not find client directory. Searched for vite.config.ts/js + index.html in: ${searchedPaths.join(", ")}`, { context: { searchedPaths } });
34
+ }
35
+ };
32
36
 
33
37
  //#endregion
34
- init_server();
35
- export { ServerError, init_server };
38
+ export { ServerError };
36
39
  //# sourceMappingURL=server.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","names":[],"sources":["../../src/errors/server.ts"],"sourcesContent":["import { AppKitError } from \"./base\";\n\n/**\n * Error thrown when server lifecycle operations fail.\n * Use for server start/stop issues, configuration conflicts, etc.\n *\n * @example\n * ```typescript\n * throw new ServerError(\"Server not started\");\n * ```\n */\nexport class ServerError extends AppKitError {\n readonly code = \"SERVER_ERROR\";\n readonly statusCode = 500;\n readonly isRetryable = false;\n\n /**\n * Create a server error for server not started\n */\n static notStarted(): ServerError {\n return new ServerError(\n \"Server not started. Please start the server first by calling the start() method\",\n );\n }\n\n /**\n * Create a server error for Vite dev server not initialized\n */\n static viteNotInitialized(): ServerError {\n return new ServerError(\"Vite dev server not initialized\");\n }\n\n /**\n * Create a server error for missing client directory\n */\n static clientDirectoryNotFound(searchedPaths: string[]): ServerError {\n return new ServerError(\n `Could not find client directory. Searched for vite.config.ts/js + index.html in: ${searchedPaths.join(\", \")}`,\n { context: { searchedPaths } },\n );\n }\n}\n"],"mappings":";;;;;;YAAqC;CAWxB,cAAb,MAAa,oBAAoB,YAAY;EAC3C,AAAS,OAAO;EAChB,AAAS,aAAa;EACtB,AAAS,cAAc;;;;EAKvB,OAAO,aAA0B;AAC/B,UAAO,IAAI,YACT,kFACD;;;;;EAMH,OAAO,qBAAkC;AACvC,UAAO,IAAI,YAAY,kCAAkC;;;;;EAM3D,OAAO,wBAAwB,eAAsC;AACnE,UAAO,IAAI,YACT,oFAAoF,cAAc,KAAK,KAAK,IAC5G,EAAE,SAAS,EAAE,eAAe,EAAE,CAC/B"}
1
+ {"version":3,"file":"server.js","names":[],"sources":["../../src/errors/server.ts"],"sourcesContent":["import { AppKitError } from \"./base\";\n\n/**\n * Error thrown when server lifecycle operations fail.\n * Use for server start/stop issues, configuration conflicts, etc.\n *\n * @example\n * ```typescript\n * throw new ServerError(\"Server not started\");\n * ```\n */\nexport class ServerError extends AppKitError {\n readonly code = \"SERVER_ERROR\";\n readonly statusCode = 500;\n readonly isRetryable = false;\n\n /**\n * Create a server error for server not started\n */\n static notStarted(): ServerError {\n return new ServerError(\n \"Server not started. Please start the server first by calling the start() method\",\n );\n }\n\n /**\n * Create a server error for Vite dev server not initialized\n */\n static viteNotInitialized(): ServerError {\n return new ServerError(\"Vite dev server not initialized\");\n }\n\n /**\n * Create a server error for missing client directory\n */\n static clientDirectoryNotFound(searchedPaths: string[]): ServerError {\n return new ServerError(\n `Could not find client directory. Searched for vite.config.ts/js + index.html in: ${searchedPaths.join(\", \")}`,\n { context: { searchedPaths } },\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;AAWA,IAAa,cAAb,MAAa,oBAAoB,YAAY;CAC3C,AAAS,OAAO;CAChB,AAAS,aAAa;CACtB,AAAS,cAAc;;;;CAKvB,OAAO,aAA0B;AAC/B,SAAO,IAAI,YACT,kFACD;;;;;CAMH,OAAO,qBAAkC;AACvC,SAAO,IAAI,YAAY,kCAAkC;;;;;CAM3D,OAAO,wBAAwB,eAAsC;AACnE,SAAO,IAAI,YACT,oFAAoF,cAAc,KAAK,KAAK,IAC5G,EAAE,SAAS,EAAE,eAAe,EAAE,CAC/B"}
@@ -1,48 +1,52 @@
1
- import { __esmMin } from "../_virtual/_rolldown/runtime.js";
2
- import { AppKitError, init_base } from "./base.js";
1
+ import { AppKitError } from "./base.js";
3
2
 
4
3
  //#region src/errors/tunnel.ts
5
- var TunnelError;
6
- var init_tunnel = __esmMin((() => {
7
- init_base();
8
- TunnelError = class TunnelError extends AppKitError {
9
- code = "TUNNEL_ERROR";
10
- statusCode = 502;
11
- isRetryable = true;
12
- /**
13
- * Create a tunnel error for missing tunnel getter
14
- */
15
- static getterNotRegistered() {
16
- return new TunnelError("Tunnel getter not registered for DevFileReader singleton");
17
- }
18
- /**
19
- * Create a tunnel error for no available connection
20
- */
21
- static noConnection() {
22
- return new TunnelError("No tunnel connection available for file read");
23
- }
24
- /**
25
- * Create a tunnel error for asset fetch failure
26
- */
27
- static fetchFailed(path, cause) {
28
- return new TunnelError("Failed to fetch asset", {
29
- cause,
30
- context: { path }
31
- });
32
- }
33
- /**
34
- * Create a tunnel error for message parsing failure
35
- */
36
- static parseError(messageType, cause) {
37
- return new TunnelError(`Failed to parse ${messageType} message`, {
38
- cause,
39
- context: { messageType }
40
- });
41
- }
42
- };
43
- }));
4
+ /**
5
+ * Error thrown when remote tunnel operations fail.
6
+ * Use for tunnel connection issues, message parsing failures, etc.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * throw new TunnelError("No tunnel connection available");
11
+ * throw new TunnelError("Failed to parse WebSocket message", { cause: parseError });
12
+ * ```
13
+ */
14
+ var TunnelError = class TunnelError extends AppKitError {
15
+ code = "TUNNEL_ERROR";
16
+ statusCode = 502;
17
+ isRetryable = true;
18
+ /**
19
+ * Create a tunnel error for missing tunnel getter
20
+ */
21
+ static getterNotRegistered() {
22
+ return new TunnelError("Tunnel getter not registered for DevFileReader singleton");
23
+ }
24
+ /**
25
+ * Create a tunnel error for no available connection
26
+ */
27
+ static noConnection() {
28
+ return new TunnelError("No tunnel connection available for file read");
29
+ }
30
+ /**
31
+ * Create a tunnel error for asset fetch failure
32
+ */
33
+ static fetchFailed(path, cause) {
34
+ return new TunnelError("Failed to fetch asset", {
35
+ cause,
36
+ context: { path }
37
+ });
38
+ }
39
+ /**
40
+ * Create a tunnel error for message parsing failure
41
+ */
42
+ static parseError(messageType, cause) {
43
+ return new TunnelError(`Failed to parse ${messageType} message`, {
44
+ cause,
45
+ context: { messageType }
46
+ });
47
+ }
48
+ };
44
49
 
45
50
  //#endregion
46
- init_tunnel();
47
- export { TunnelError, init_tunnel };
51
+ export { TunnelError };
48
52
  //# sourceMappingURL=tunnel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tunnel.js","names":[],"sources":["../../src/errors/tunnel.ts"],"sourcesContent":["import { AppKitError } from \"./base\";\n\n/**\n * Error thrown when remote tunnel operations fail.\n * Use for tunnel connection issues, message parsing failures, etc.\n *\n * @example\n * ```typescript\n * throw new TunnelError(\"No tunnel connection available\");\n * throw new TunnelError(\"Failed to parse WebSocket message\", { cause: parseError });\n * ```\n */\nexport class TunnelError extends AppKitError {\n readonly code = \"TUNNEL_ERROR\";\n readonly statusCode = 502;\n readonly isRetryable = true;\n\n /**\n * Create a tunnel error for missing tunnel getter\n */\n static getterNotRegistered(): TunnelError {\n return new TunnelError(\n \"Tunnel getter not registered for DevFileReader singleton\",\n );\n }\n\n /**\n * Create a tunnel error for no available connection\n */\n static noConnection(): TunnelError {\n return new TunnelError(\"No tunnel connection available for file read\");\n }\n\n /**\n * Create a tunnel error for asset fetch failure\n */\n static fetchFailed(path: string, cause?: Error): TunnelError {\n return new TunnelError(\"Failed to fetch asset\", {\n cause,\n context: { path },\n });\n }\n\n /**\n * Create a tunnel error for message parsing failure\n */\n static parseError(messageType: string, cause?: Error): TunnelError {\n return new TunnelError(`Failed to parse ${messageType} message`, {\n cause,\n context: { messageType },\n });\n }\n}\n"],"mappings":";;;;;;YAAqC;CAYxB,cAAb,MAAa,oBAAoB,YAAY;EAC3C,AAAS,OAAO;EAChB,AAAS,aAAa;EACtB,AAAS,cAAc;;;;EAKvB,OAAO,sBAAmC;AACxC,UAAO,IAAI,YACT,2DACD;;;;;EAMH,OAAO,eAA4B;AACjC,UAAO,IAAI,YAAY,+CAA+C;;;;;EAMxE,OAAO,YAAY,MAAc,OAA4B;AAC3D,UAAO,IAAI,YAAY,yBAAyB;IAC9C;IACA,SAAS,EAAE,MAAM;IAClB,CAAC;;;;;EAMJ,OAAO,WAAW,aAAqB,OAA4B;AACjE,UAAO,IAAI,YAAY,mBAAmB,YAAY,WAAW;IAC/D;IACA,SAAS,EAAE,aAAa;IACzB,CAAC"}
1
+ {"version":3,"file":"tunnel.js","names":[],"sources":["../../src/errors/tunnel.ts"],"sourcesContent":["import { AppKitError } from \"./base\";\n\n/**\n * Error thrown when remote tunnel operations fail.\n * Use for tunnel connection issues, message parsing failures, etc.\n *\n * @example\n * ```typescript\n * throw new TunnelError(\"No tunnel connection available\");\n * throw new TunnelError(\"Failed to parse WebSocket message\", { cause: parseError });\n * ```\n */\nexport class TunnelError extends AppKitError {\n readonly code = \"TUNNEL_ERROR\";\n readonly statusCode = 502;\n readonly isRetryable = true;\n\n /**\n * Create a tunnel error for missing tunnel getter\n */\n static getterNotRegistered(): TunnelError {\n return new TunnelError(\n \"Tunnel getter not registered for DevFileReader singleton\",\n );\n }\n\n /**\n * Create a tunnel error for no available connection\n */\n static noConnection(): TunnelError {\n return new TunnelError(\"No tunnel connection available for file read\");\n }\n\n /**\n * Create a tunnel error for asset fetch failure\n */\n static fetchFailed(path: string, cause?: Error): TunnelError {\n return new TunnelError(\"Failed to fetch asset\", {\n cause,\n context: { path },\n });\n }\n\n /**\n * Create a tunnel error for message parsing failure\n */\n static parseError(messageType: string, cause?: Error): TunnelError {\n return new TunnelError(`Failed to parse ${messageType} message`, {\n cause,\n context: { messageType },\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAYA,IAAa,cAAb,MAAa,oBAAoB,YAAY;CAC3C,AAAS,OAAO;CAChB,AAAS,aAAa;CACtB,AAAS,cAAc;;;;CAKvB,OAAO,sBAAmC;AACxC,SAAO,IAAI,YACT,2DACD;;;;;CAMH,OAAO,eAA4B;AACjC,SAAO,IAAI,YAAY,+CAA+C;;;;;CAMxE,OAAO,YAAY,MAAc,OAA4B;AAC3D,SAAO,IAAI,YAAY,yBAAyB;GAC9C;GACA,SAAS,EAAE,MAAM;GAClB,CAAC;;;;;CAMJ,OAAO,WAAW,aAAqB,OAA4B;AACjE,SAAO,IAAI,YAAY,mBAAmB,YAAY,WAAW;GAC/D;GACA,SAAS,EAAE,aAAa;GACzB,CAAC"}