@salesforce/metadata-core-sdk 1.0.0

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 (150) hide show
  1. package/LICENSE.txt +27 -0
  2. package/README.md +219 -0
  3. package/dist/index.d.ts +38 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +22 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/sdk/abstractions/core/IPlatformContext.d.ts +45 -0
  8. package/dist/sdk/abstractions/core/IPlatformContext.d.ts.map +1 -0
  9. package/dist/sdk/abstractions/core/IPlatformContext.js +8 -0
  10. package/dist/sdk/abstractions/core/IPlatformContext.js.map +1 -0
  11. package/dist/sdk/abstractions/core/index.d.ts +8 -0
  12. package/dist/sdk/abstractions/core/index.d.ts.map +1 -0
  13. package/dist/sdk/abstractions/core/index.js +8 -0
  14. package/dist/sdk/abstractions/core/index.js.map +1 -0
  15. package/dist/sdk/abstractions/index.d.ts +17 -0
  16. package/dist/sdk/abstractions/index.d.ts.map +1 -0
  17. package/dist/sdk/abstractions/index.js +20 -0
  18. package/dist/sdk/abstractions/index.js.map +1 -0
  19. package/dist/sdk/abstractions/services/IFileSystem.d.ts +114 -0
  20. package/dist/sdk/abstractions/services/IFileSystem.d.ts.map +1 -0
  21. package/dist/sdk/abstractions/services/IFileSystem.js +8 -0
  22. package/dist/sdk/abstractions/services/IFileSystem.js.map +1 -0
  23. package/dist/sdk/abstractions/services/ILogger.d.ts +63 -0
  24. package/dist/sdk/abstractions/services/ILogger.d.ts.map +1 -0
  25. package/dist/sdk/abstractions/services/ILogger.js +18 -0
  26. package/dist/sdk/abstractions/services/ILogger.js.map +1 -0
  27. package/dist/sdk/abstractions/services/ITelemetry.d.ts +159 -0
  28. package/dist/sdk/abstractions/services/ITelemetry.d.ts.map +1 -0
  29. package/dist/sdk/abstractions/services/ITelemetry.js +97 -0
  30. package/dist/sdk/abstractions/services/ITelemetry.js.map +1 -0
  31. package/dist/sdk/abstractions/services/index.d.ts +10 -0
  32. package/dist/sdk/abstractions/services/index.d.ts.map +1 -0
  33. package/dist/sdk/abstractions/services/index.js +10 -0
  34. package/dist/sdk/abstractions/services/index.js.map +1 -0
  35. package/dist/sdk/abstractions/types/FileMetadata.d.ts +15 -0
  36. package/dist/sdk/abstractions/types/FileMetadata.d.ts.map +1 -0
  37. package/dist/sdk/abstractions/types/FileMetadata.js +8 -0
  38. package/dist/sdk/abstractions/types/FileMetadata.js.map +1 -0
  39. package/dist/sdk/abstractions/types/Result.d.ts +15 -0
  40. package/dist/sdk/abstractions/types/Result.d.ts.map +1 -0
  41. package/dist/sdk/abstractions/types/Result.js +8 -0
  42. package/dist/sdk/abstractions/types/Result.js.map +1 -0
  43. package/dist/sdk/abstractions/types/index.d.ts +9 -0
  44. package/dist/sdk/abstractions/types/index.d.ts.map +1 -0
  45. package/dist/sdk/abstractions/types/index.js +9 -0
  46. package/dist/sdk/abstractions/types/index.js.map +1 -0
  47. package/dist/sdk/constants.d.ts +35 -0
  48. package/dist/sdk/constants.d.ts.map +1 -0
  49. package/dist/sdk/constants.js +35 -0
  50. package/dist/sdk/constants.js.map +1 -0
  51. package/dist/sdk/contracts/core/IMetadataParser.d.ts +49 -0
  52. package/dist/sdk/contracts/core/IMetadataParser.d.ts.map +1 -0
  53. package/dist/sdk/contracts/core/IMetadataParser.js +8 -0
  54. package/dist/sdk/contracts/core/IMetadataParser.js.map +1 -0
  55. package/dist/sdk/contracts/core/IVisualizationPlugin.d.ts +65 -0
  56. package/dist/sdk/contracts/core/IVisualizationPlugin.d.ts.map +1 -0
  57. package/dist/sdk/contracts/core/IVisualizationPlugin.js +8 -0
  58. package/dist/sdk/contracts/core/IVisualizationPlugin.js.map +1 -0
  59. package/dist/sdk/contracts/core/index.d.ts +9 -0
  60. package/dist/sdk/contracts/core/index.d.ts.map +1 -0
  61. package/dist/sdk/contracts/core/index.js +9 -0
  62. package/dist/sdk/contracts/core/index.js.map +1 -0
  63. package/dist/sdk/contracts/index.d.ts +9 -0
  64. package/dist/sdk/contracts/index.d.ts.map +1 -0
  65. package/dist/sdk/contracts/index.js +9 -0
  66. package/dist/sdk/contracts/index.js.map +1 -0
  67. package/dist/sdk/contracts/types/MetadataPluginInfo.d.ts +56 -0
  68. package/dist/sdk/contracts/types/MetadataPluginInfo.d.ts.map +1 -0
  69. package/dist/sdk/contracts/types/MetadataPluginInfo.js +8 -0
  70. package/dist/sdk/contracts/types/MetadataPluginInfo.js.map +1 -0
  71. package/dist/sdk/contracts/types/PluginConfig.d.ts +16 -0
  72. package/dist/sdk/contracts/types/PluginConfig.d.ts.map +1 -0
  73. package/dist/sdk/contracts/types/PluginConfig.js +8 -0
  74. package/dist/sdk/contracts/types/PluginConfig.js.map +1 -0
  75. package/dist/sdk/contracts/types/PluginContext.d.ts +22 -0
  76. package/dist/sdk/contracts/types/PluginContext.d.ts.map +1 -0
  77. package/dist/sdk/contracts/types/PluginContext.js +8 -0
  78. package/dist/sdk/contracts/types/PluginContext.js.map +1 -0
  79. package/dist/sdk/contracts/types/PluginError.d.ts +50 -0
  80. package/dist/sdk/contracts/types/PluginError.d.ts.map +1 -0
  81. package/dist/sdk/contracts/types/PluginError.js +31 -0
  82. package/dist/sdk/contracts/types/PluginError.js.map +1 -0
  83. package/dist/sdk/contracts/types/ValidationResult.d.ts +15 -0
  84. package/dist/sdk/contracts/types/ValidationResult.d.ts.map +1 -0
  85. package/dist/sdk/contracts/types/ValidationResult.js +8 -0
  86. package/dist/sdk/contracts/types/ValidationResult.js.map +1 -0
  87. package/dist/sdk/contracts/types/VersionInfo.d.ts +24 -0
  88. package/dist/sdk/contracts/types/VersionInfo.d.ts.map +1 -0
  89. package/dist/sdk/contracts/types/VersionInfo.js +8 -0
  90. package/dist/sdk/contracts/types/VersionInfo.js.map +1 -0
  91. package/dist/sdk/contracts/types/index.d.ts +13 -0
  92. package/dist/sdk/contracts/types/index.d.ts.map +1 -0
  93. package/dist/sdk/contracts/types/index.js +13 -0
  94. package/dist/sdk/contracts/types/index.js.map +1 -0
  95. package/dist/sdk/design-system/index.d.ts +11 -0
  96. package/dist/sdk/design-system/index.d.ts.map +1 -0
  97. package/dist/sdk/design-system/index.js +12 -0
  98. package/dist/sdk/design-system/index.js.map +1 -0
  99. package/dist/sdk/design-system/tokens/colors.d.ts +122 -0
  100. package/dist/sdk/design-system/tokens/colors.d.ts.map +1 -0
  101. package/dist/sdk/design-system/tokens/colors.js +142 -0
  102. package/dist/sdk/design-system/tokens/colors.js.map +1 -0
  103. package/dist/sdk/design-system/tokens/spacing.d.ts +24 -0
  104. package/dist/sdk/design-system/tokens/spacing.d.ts.map +1 -0
  105. package/dist/sdk/design-system/tokens/spacing.js +24 -0
  106. package/dist/sdk/design-system/tokens/spacing.js.map +1 -0
  107. package/dist/sdk/design-system/tokens/typography.d.ts +31 -0
  108. package/dist/sdk/design-system/tokens/typography.d.ts.map +1 -0
  109. package/dist/sdk/design-system/tokens/typography.js +31 -0
  110. package/dist/sdk/design-system/tokens/typography.js.map +1 -0
  111. package/dist/sdk/design-system/utils.d.ts +66 -0
  112. package/dist/sdk/design-system/utils.d.ts.map +1 -0
  113. package/dist/sdk/design-system/utils.js +116 -0
  114. package/dist/sdk/design-system/utils.js.map +1 -0
  115. package/dist/sdk/design-system/vscode-design-system.css +623 -0
  116. package/dist/sdk/utils/errors/ErrorBoundary.d.ts +35 -0
  117. package/dist/sdk/utils/errors/ErrorBoundary.d.ts.map +1 -0
  118. package/dist/sdk/utils/errors/ErrorBoundary.js +65 -0
  119. package/dist/sdk/utils/errors/ErrorBoundary.js.map +1 -0
  120. package/dist/sdk/utils/errors/ErrorBuilder.d.ts +107 -0
  121. package/dist/sdk/utils/errors/ErrorBuilder.d.ts.map +1 -0
  122. package/dist/sdk/utils/errors/ErrorBuilder.js +163 -0
  123. package/dist/sdk/utils/errors/ErrorBuilder.js.map +1 -0
  124. package/dist/sdk/utils/errors/setupHandlers.d.ts +12 -0
  125. package/dist/sdk/utils/errors/setupHandlers.d.ts.map +1 -0
  126. package/dist/sdk/utils/errors/setupHandlers.js +42 -0
  127. package/dist/sdk/utils/errors/setupHandlers.js.map +1 -0
  128. package/dist/sdk/utils/logger.d.ts +41 -0
  129. package/dist/sdk/utils/logger.d.ts.map +1 -0
  130. package/dist/sdk/utils/logger.js +54 -0
  131. package/dist/sdk/utils/logger.js.map +1 -0
  132. package/dist/sdk/utils/test-helpers/architecture-test-utils.d.ts +146 -0
  133. package/dist/sdk/utils/test-helpers/architecture-test-utils.d.ts.map +1 -0
  134. package/dist/sdk/utils/test-helpers/architecture-test-utils.js +286 -0
  135. package/dist/sdk/utils/test-helpers/architecture-test-utils.js.map +1 -0
  136. package/dist/sdk/utils/test-helpers/index.d.ts +8 -0
  137. package/dist/sdk/utils/test-helpers/index.d.ts.map +1 -0
  138. package/dist/sdk/utils/test-helpers/index.js +8 -0
  139. package/dist/sdk/utils/test-helpers/index.js.map +1 -0
  140. package/dist/sdk/utils/xmlParser.d.ts +38 -0
  141. package/dist/sdk/utils/xmlParser.d.ts.map +1 -0
  142. package/dist/sdk/utils/xmlParser.js +79 -0
  143. package/dist/sdk/utils/xmlParser.js.map +1 -0
  144. package/dist/sdk/webviewMessageTypes.d.ts +24 -0
  145. package/dist/sdk/webviewMessageTypes.d.ts.map +1 -0
  146. package/dist/sdk/webviewMessageTypes.js +23 -0
  147. package/dist/sdk/webviewMessageTypes.js.map +1 -0
  148. package/package.json +80 -0
  149. package/src/sdk/utils/test-helpers/architecture-test-utils.ts +365 -0
  150. package/src/sdk/utils/test-helpers/index.ts +20 -0
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright (c) 2025, Salesforce, Inc.
3
+ * All rights reserved.
4
+ * Licensed under the BSD 3-Clause license.
5
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ **/
7
+ /**
8
+ * Log levels
9
+ **/
10
+ export var LogLevel;
11
+ (function (LogLevel) {
12
+ LogLevel["Debug"] = "debug";
13
+ LogLevel["Info"] = "info";
14
+ LogLevel["Warn"] = "warn";
15
+ LogLevel["Error"] = "error";
16
+ LogLevel["Success"] = "success";
17
+ })(LogLevel || (LogLevel = {}));
18
+ //# sourceMappingURL=ILogger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ILogger.js","sourceRoot":"","sources":["../../../../src/sdk/abstractions/services/ILogger.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ;;IAEI;AACJ,MAAM,CAAN,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,2BAAe,CAAA;IACf,yBAAa,CAAA;IACb,yBAAa,CAAA;IACb,2BAAe,CAAA;IACf,+BAAmB,CAAA;AACrB,CAAC,EANW,QAAQ,KAAR,QAAQ,QAMnB"}
@@ -0,0 +1,159 @@
1
+ /**
2
+ * Copyright (c) 2025, Salesforce, Inc.
3
+ * All rights reserved.
4
+ * Licensed under the BSD 3-Clause license.
5
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ **/
7
+ export type TelemetryProperties = Record<string, string>;
8
+ export type TelemetryMeasurements = Record<string, number>;
9
+ /**
10
+ * Represents a unit of work for telemetry tracking.
11
+ * Spans automatically track duration from creation to end().
12
+ *
13
+ * Usage:
14
+ * ```typescript
15
+ * const span = telemetry.startSpan('visualization');
16
+ * try {
17
+ * span.setAttribute('pluginId', 'object');
18
+ * // ... do work ...
19
+ * span.end(); // Records success with duration
20
+ * } catch (error) {
21
+ * span.recordError(error);
22
+ * span.end(); // Records error with duration
23
+ * throw error;
24
+ * }
25
+ * ```
26
+ *
27
+ * Or use the helper for automatic cleanup:
28
+ * ```typescript
29
+ * await telemetry.withSpan('visualization', async (span) => {
30
+ * span.setAttribute('pluginId', 'object');
31
+ * // ... do work - span.end() called automatically ...
32
+ * });
33
+ * ```
34
+ */
35
+ export interface ITelemetrySpan {
36
+ /**
37
+ * Set an attribute on the span.
38
+ * Can be called multiple times before end().
39
+ *
40
+ * @param key Attribute name
41
+ * @param value Attribute value (will be converted to string)
42
+ */
43
+ setAttribute(key: string, value: string | number | boolean): void;
44
+ /**
45
+ * Record an error that occurred during this span.
46
+ * Sets the span status to error and captures error details.
47
+ *
48
+ * @param error The error that occurred
49
+ */
50
+ recordError(error: Error | unknown): void;
51
+ /**
52
+ * End the span and send telemetry.
53
+ * Must be called to record the span - unclosed spans are not sent.
54
+ * Calling end() multiple times has no effect after the first call.
55
+ */
56
+ end(): void;
57
+ }
58
+ /**
59
+ * Platform-agnostic telemetry interface.
60
+ *
61
+ * Telemetry is for structured, low-cardinality events and numeric measurements
62
+ * (e.g., performance timings, success/failure rates).
63
+ *
64
+ * Implementations must be best-effort and MUST NOT throw.
65
+ */
66
+ export interface ITelemetry {
67
+ /**
68
+ * Send a telemetry event.
69
+ *
70
+ * @param eventName Unique event identifier (e.g., 'plugin.loaded', 'visualization.rendered')
71
+ * @param properties Low-cardinality string dimensions
72
+ * @param measurements Numeric metrics
73
+ */
74
+ sendEvent(eventName: string, properties?: TelemetryProperties, measurements?: TelemetryMeasurements): void;
75
+ /**
76
+ * Send an exception/error telemetry event.
77
+ *
78
+ * @param exceptionName Name/category of the exception
79
+ * @param error Original error value
80
+ * @param properties Optional context properties
81
+ */
82
+ sendException(exceptionName: string, error: unknown, properties?: TelemetryProperties): void;
83
+ /**
84
+ * Start a new telemetry span for tracking a unit of work.
85
+ *
86
+ * The span automatically tracks duration from creation to end().
87
+ * Always call span.end() when the work is complete.
88
+ *
89
+ * @param name Span name (e.g., 'visualization', 'plugin.load')
90
+ * @param properties Initial properties to include
91
+ * @returns A span that must be ended with end()
92
+ */
93
+ startSpan(name: string, properties?: TelemetryProperties): ITelemetrySpan;
94
+ /**
95
+ * Execute a function within a span, automatically handling end() and errors.
96
+ *
97
+ * This is the preferred way to use spans as it guarantees proper cleanup.
98
+ *
99
+ * @param name Span name
100
+ * @param fn Function to execute - receives the span for adding attributes
101
+ * @param properties Initial properties
102
+ * @returns The result of the function
103
+ */
104
+ withSpan<T>(name: string, fn: (span: ITelemetrySpan) => Promise<T>, properties?: TelemetryProperties): Promise<T>;
105
+ /**
106
+ * Create a child telemetry instance with additional default properties.
107
+ *
108
+ * Useful for component/plugin-specific enrichment.
109
+ * Child spans will inherit these properties.
110
+ */
111
+ createChild(defaultProperties: TelemetryProperties): ITelemetry;
112
+ /**
113
+ * Whether telemetry is enabled (best-effort).
114
+ */
115
+ isTelemetryEnabled(): boolean;
116
+ /**
117
+ * Cleanup resources on shutdown.
118
+ */
119
+ dispose(): Promise<void>;
120
+ }
121
+ /**
122
+ * Default implementation of ITelemetrySpan.
123
+ *
124
+ * Tracks duration automatically and sends telemetry on end().
125
+ */
126
+ export declare class TelemetrySpan implements ITelemetrySpan {
127
+ private readonly name;
128
+ private readonly telemetry;
129
+ private readonly startTime;
130
+ private readonly properties;
131
+ private ended;
132
+ private errorRecorded;
133
+ constructor(name: string, telemetry: ITelemetry, initialProperties?: TelemetryProperties);
134
+ setAttribute(key: string, value: string | number | boolean): void;
135
+ recordError(error: Error | unknown): void;
136
+ end(): void;
137
+ }
138
+ /**
139
+ * No-op telemetry span for when telemetry is disabled.
140
+ */
141
+ export declare class NoOpTelemetrySpan implements ITelemetrySpan {
142
+ setAttribute(_key: string, _value: string | number | boolean): void;
143
+ recordError(_error: Error | unknown): void;
144
+ end(): void;
145
+ }
146
+ /**
147
+ * No-op telemetry implementation for platforms that don't provide telemetry
148
+ * or when telemetry is disabled.
149
+ */
150
+ export declare class NoOpTelemetry implements ITelemetry {
151
+ sendEvent(_eventName: string, _properties?: TelemetryProperties, _measurements?: TelemetryMeasurements): void;
152
+ sendException(_exceptionName: string, _error: unknown, _properties?: TelemetryProperties): void;
153
+ startSpan(_name: string, _properties?: TelemetryProperties): ITelemetrySpan;
154
+ withSpan<T>(_name: string, fn: (span: ITelemetrySpan) => Promise<T>, _properties?: TelemetryProperties): Promise<T>;
155
+ createChild(_defaultProperties: TelemetryProperties): ITelemetry;
156
+ isTelemetryEnabled(): boolean;
157
+ dispose(): Promise<void>;
158
+ }
159
+ //# sourceMappingURL=ITelemetry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITelemetry.d.ts","sourceRoot":"","sources":["../../../../src/sdk/abstractions/services/ITelemetry.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,97 @@
1
+ /**
2
+ * Copyright (c) 2025, Salesforce, Inc.
3
+ * All rights reserved.
4
+ * Licensed under the BSD 3-Clause license.
5
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ **/
7
+ /**
8
+ * Default implementation of ITelemetrySpan.
9
+ *
10
+ * Tracks duration automatically and sends telemetry on end().
11
+ */
12
+ export class TelemetrySpan {
13
+ constructor(name, telemetry, initialProperties = {}) {
14
+ this.name = name;
15
+ this.telemetry = telemetry;
16
+ this.startTime = Date.now();
17
+ this.ended = false;
18
+ this.errorRecorded = false;
19
+ this.properties = { ...initialProperties };
20
+ }
21
+ setAttribute(key, value) {
22
+ if (this.ended) {
23
+ return;
24
+ }
25
+ this.properties[key] = String(value);
26
+ }
27
+ recordError(error) {
28
+ if (this.ended) {
29
+ return;
30
+ }
31
+ this.errorRecorded = true;
32
+ if (error instanceof Error) {
33
+ this.properties.errorType = error.name;
34
+ // Sanitize and truncate error message
35
+ this.properties.errorMessage = error.message
36
+ .replace(/([A-Za-z]:)?[\\/][^\s]+/g, '[path]')
37
+ .replace(/\s+/g, ' ')
38
+ .slice(0, 500);
39
+ }
40
+ else {
41
+ this.properties.errorType = typeof error;
42
+ this.properties.errorMessage = String(error).slice(0, 500);
43
+ }
44
+ }
45
+ end() {
46
+ if (this.ended) {
47
+ return;
48
+ }
49
+ this.ended = true;
50
+ const durationMs = Date.now() - this.startTime;
51
+ this.properties.status = this.errorRecorded ? 'error' : 'success';
52
+ this.telemetry.sendEvent(this.name, this.properties, { durationMs });
53
+ }
54
+ }
55
+ /**
56
+ * No-op telemetry span for when telemetry is disabled.
57
+ */
58
+ export class NoOpTelemetrySpan {
59
+ setAttribute(_key, _value) {
60
+ // no-op
61
+ }
62
+ recordError(_error) {
63
+ // no-op
64
+ }
65
+ end() {
66
+ // no-op
67
+ }
68
+ }
69
+ /**
70
+ * No-op telemetry implementation for platforms that don't provide telemetry
71
+ * or when telemetry is disabled.
72
+ */
73
+ export class NoOpTelemetry {
74
+ sendEvent(_eventName, _properties, _measurements) {
75
+ // no-op
76
+ }
77
+ sendException(_exceptionName, _error, _properties) {
78
+ // no-op
79
+ }
80
+ startSpan(_name, _properties) {
81
+ return new NoOpTelemetrySpan();
82
+ }
83
+ async withSpan(_name, fn, _properties) {
84
+ // Still execute the function, just with a no-op span
85
+ return fn(new NoOpTelemetrySpan());
86
+ }
87
+ createChild(_defaultProperties) {
88
+ return this;
89
+ }
90
+ isTelemetryEnabled() {
91
+ return false;
92
+ }
93
+ async dispose() {
94
+ // no-op
95
+ }
96
+ }
97
+ //# sourceMappingURL=ITelemetry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITelemetry.js","sourceRoot":"","sources":["../../../../src/sdk/abstractions/services/ITelemetry.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Copyright (c) 2025, Salesforce, Inc.
3
+ * All rights reserved.
4
+ * Licensed under the BSD 3-Clause license.
5
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ **/
7
+ export * from './IFileSystem.js';
8
+ export * from './ILogger.js';
9
+ export * from './ITelemetry.js';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sdk/abstractions/services/index.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Copyright (c) 2025, Salesforce, Inc.
3
+ * All rights reserved.
4
+ * Licensed under the BSD 3-Clause license.
5
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ **/
7
+ export * from './IFileSystem.js';
8
+ export * from './ILogger.js';
9
+ export * from './ITelemetry.js';
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sdk/abstractions/services/index.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Copyright (c) 2025, Salesforce, Inc.
3
+ * All rights reserved.
4
+ * Licensed under the BSD 3-Clause license.
5
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ **/
7
+ /**
8
+ * File metadata
9
+ */
10
+ export interface FileMetadata {
11
+ path: string;
12
+ fileName: string;
13
+ extension: string;
14
+ }
15
+ //# sourceMappingURL=FileMetadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileMetadata.d.ts","sourceRoot":"","sources":["../../../../src/sdk/abstractions/types/FileMetadata.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright (c) 2025, Salesforce, Inc.
3
+ * All rights reserved.
4
+ * Licensed under the BSD 3-Clause license.
5
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ **/
7
+ export {};
8
+ //# sourceMappingURL=FileMetadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileMetadata.js","sourceRoot":"","sources":["../../../../src/sdk/abstractions/types/FileMetadata.ts"],"names":[],"mappings":"AAAA;;;;;IAKI"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Copyright (c) 2025, Salesforce, Inc.
3
+ * All rights reserved.
4
+ * Licensed under the BSD 3-Clause license.
5
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ **/
7
+ /**
8
+ * Common result type for async operations
9
+ */
10
+ export interface Result<T, E = Error> {
11
+ success: boolean;
12
+ data?: T;
13
+ error?: E;
14
+ }
15
+ //# sourceMappingURL=Result.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Result.d.ts","sourceRoot":"","sources":["../../../../src/sdk/abstractions/types/Result.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ;;GAEG;AACH,MAAM,WAAW,MAAM,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,KAAK,CAAC,EAAE,CAAC,CAAC;CACX"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright (c) 2025, Salesforce, Inc.
3
+ * All rights reserved.
4
+ * Licensed under the BSD 3-Clause license.
5
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ **/
7
+ export {};
8
+ //# sourceMappingURL=Result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Result.js","sourceRoot":"","sources":["../../../../src/sdk/abstractions/types/Result.ts"],"names":[],"mappings":"AAAA;;;;;IAKI"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) 2025, Salesforce, Inc.
3
+ * All rights reserved.
4
+ * Licensed under the BSD 3-Clause license.
5
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ **/
7
+ export * from './FileMetadata.js';
8
+ export * from './Result.js';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sdk/abstractions/types/index.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) 2025, Salesforce, Inc.
3
+ * All rights reserved.
4
+ * Licensed under the BSD 3-Clause license.
5
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ **/
7
+ export * from './FileMetadata.js';
8
+ export * from './Result.js';
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sdk/abstractions/types/index.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Copyright (c) 2025, Salesforce, Inc.
3
+ * All rights reserved.
4
+ * Licensed under the BSD 3-Clause license.
5
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ **/
7
+ /**
8
+ * Directory name constants for plugin build structure
9
+ *
10
+ * Single source of truth for directory names used across the build pipeline.
11
+ * These constants ensure consistency across:
12
+ * - Framework: Constructing React build paths
13
+ * - Plugins: Build scripts (build-react-apps.js, vite.config.ts)
14
+ * - Extension: Path resolution (webpack.config.js, VSCodeVisualizationEngine)
15
+ *
16
+ * Path structure: {PLUGINS_DIST_DIR}/{PLUGINS_DIR}/{pluginId}/{REACT_UI_DIR_NAME}/
17
+ * Example: dist/plugins/permissionset/ui/
18
+ */
19
+ /**
20
+ * Build output directory name
21
+ * Used for plugin build outputs: dist/plugins/{pluginId}/ui/
22
+ */
23
+ export declare const PLUGINS_DIST_DIR = "dist";
24
+ /**
25
+ * Plugins directory name
26
+ * Used for organizing plugin builds: dist/plugins/{pluginId}/ui/
27
+ * Also used in extension: {extensionUri}/plugins/{pluginId}/ui/
28
+ */
29
+ export declare const PLUGINS_DIR = "plugins";
30
+ /**
31
+ * React UI directory name
32
+ * Used for React app build outputs: dist/plugins/{pluginId}/ui/
33
+ */
34
+ export declare const REACT_UI_DIR_NAME = "ui";
35
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/sdk/constants.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ;;;;;;;;;;;GAWG;AAEH;;;GAGG;AACH,eAAO,MAAM,gBAAgB,SAAS,CAAC;AAEvC;;;;GAIG;AACH,eAAO,MAAM,WAAW,YAAY,CAAC;AAErC;;;GAGG;AACH,eAAO,MAAM,iBAAiB,OAAO,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Copyright (c) 2025, Salesforce, Inc.
3
+ * All rights reserved.
4
+ * Licensed under the BSD 3-Clause license.
5
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ **/
7
+ /**
8
+ * Directory name constants for plugin build structure
9
+ *
10
+ * Single source of truth for directory names used across the build pipeline.
11
+ * These constants ensure consistency across:
12
+ * - Framework: Constructing React build paths
13
+ * - Plugins: Build scripts (build-react-apps.js, vite.config.ts)
14
+ * - Extension: Path resolution (webpack.config.js, VSCodeVisualizationEngine)
15
+ *
16
+ * Path structure: {PLUGINS_DIST_DIR}/{PLUGINS_DIR}/{pluginId}/{REACT_UI_DIR_NAME}/
17
+ * Example: dist/plugins/permissionset/ui/
18
+ */
19
+ /**
20
+ * Build output directory name
21
+ * Used for plugin build outputs: dist/plugins/{pluginId}/ui/
22
+ */
23
+ export const PLUGINS_DIST_DIR = 'dist';
24
+ /**
25
+ * Plugins directory name
26
+ * Used for organizing plugin builds: dist/plugins/{pluginId}/ui/
27
+ * Also used in extension: {extensionUri}/plugins/{pluginId}/ui/
28
+ */
29
+ export const PLUGINS_DIR = 'plugins';
30
+ /**
31
+ * React UI directory name
32
+ * Used for React app build outputs: dist/plugins/{pluginId}/ui/
33
+ */
34
+ export const REACT_UI_DIR_NAME = 'ui';
35
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/sdk/constants.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ;;;;;;;;;;;GAWG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEvC;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,SAAS,CAAC;AAErC;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Copyright (c) 2025, Salesforce, Inc.
3
+ * All rights reserved.
4
+ * Licensed under the BSD 3-Clause license.
5
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ **/
7
+ import { ValidationResult } from '../types/ValidationResult.js';
8
+ import { VersionInfo } from '../types/VersionInfo.js';
9
+ /**
10
+ * Contract for parsing metadata files
11
+ *
12
+ * Parsers extract structured data from metadata files (XML, JSON, etc.)
13
+ * and optionally validate the parsed data.
14
+ */
15
+ export interface IMetadataParser<TData> {
16
+ /**
17
+ * Parse a single metadata file
18
+ *
19
+ * @param filePath - Path to the metadata file
20
+ * @param versionInfo - Version information resolved by framework
21
+ * @returns Parsed data structure
22
+ */
23
+ parse(filePath: string, versionInfo: VersionInfo): Promise<TData>;
24
+ /**
25
+ * Validate the parsed data
26
+ *
27
+ * Optional hook for validating parsed data. If validation errors are found,
28
+ * the framework will stop processing and show the error.
29
+ *
30
+ * @param data - Parsed data to validate
31
+ * @returns Validation result with errors and warnings
32
+ */
33
+ validate?(data: TData): ValidationResult;
34
+ /**
35
+ * Get visualization-dependent file paths
36
+ *
37
+ * Optional hook that returns additional file paths whose changes should trigger
38
+ * re-visualization of the target file. Useful for plugins that generate
39
+ * visualizations from multiple related files (e.g., metadata XML + associated files).
40
+ *
41
+ * When any of these dependent files are modified or marked dirty, the visualization
42
+ * engine will detect it and can refresh the visualization accordingly.
43
+ *
44
+ * @param filePath - Path to the primary metadata file being visualized
45
+ * @returns Promise of array of absolute file paths that this visualization depends on (empty array if none)
46
+ */
47
+ getVizDependentFilePaths?(filePath: string): Promise<string[]>;
48
+ }
49
+ //# sourceMappingURL=IMetadataParser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IMetadataParser.d.ts","sourceRoot":"","sources":["../../../../src/sdk/contracts/core/IMetadataParser.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,WAAW,eAAe,CAAC,KAAK;IACpC;;;;;;OAMG;IACH,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAElE;;;;;;;;OAQG;IACH,QAAQ,CAAC,CAAC,IAAI,EAAE,KAAK,GAAG,gBAAgB,CAAC;IAEzC;;;;;;;;;;;;OAYG;IACH,wBAAwB,CAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;CAChE"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright (c) 2025, Salesforce, Inc.
3
+ * All rights reserved.
4
+ * Licensed under the BSD 3-Clause license.
5
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ **/
7
+ export {};
8
+ //# sourceMappingURL=IMetadataParser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IMetadataParser.js","sourceRoot":"","sources":["../../../../src/sdk/contracts/core/IMetadataParser.ts"],"names":[],"mappings":"AAAA;;;;;IAKI"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Copyright (c) 2025, Salesforce, Inc.
3
+ * All rights reserved.
4
+ * Licensed under the BSD 3-Clause license.
5
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ **/
7
+ import { MetadataPluginInfo } from '../types/MetadataPluginInfo.js';
8
+ import { IMetadataParser } from './IMetadataParser.js';
9
+ import { IPlatformContext } from '../../abstractions/core/IPlatformContext.js';
10
+ /**
11
+ * Visualization plugin contract
12
+ *
13
+ * This is the main interface that all visualization plugins must implement.
14
+ * Plugins implement this interface directly - no base class needed.
15
+ *
16
+ * **Key Characteristics**:
17
+ * - Must implement `getMetadataPluginInfo()` hook to provide metadata
18
+ * - Must have a `parser` property (required)
19
+ * - Must implement `canHandle()` and `initialize()` lifecycle hooks
20
+ * - Optional lifecycle hooks: `dispose()`, `getActions()`
21
+ * - Framework auto detects renderer react plugins implementation by checking for ui/ directory
22
+ *
23
+ * **Examples**: Object ERD, Flow diagrams, Permission Set matrices
24
+ */
25
+ export interface IVisualizationPlugin<TData = any> {
26
+ /**
27
+ * Get plugin metadata information.
28
+ *
29
+ * This is a mandatory hook that plugins must implement.
30
+ * Framework calls this during plugin registration to get plugin metadata.
31
+ * Framework then validates the returned metadata information and log it.
32
+ *
33
+ * @returns MetadataPluginInfo object with all metadata fields including id
34
+ */
35
+ getMetadataPluginInfo(): MetadataPluginInfo;
36
+ /**
37
+ * Parser for extracting structured data from metadata files
38
+ */
39
+ parser: IMetadataParser<TData>;
40
+ /**
41
+ * Check if this plugin can handle the given file path
42
+ * Called by the framework to determine which plugin should handle a file.
43
+ *
44
+ * @param filePath - Path to the metadata file
45
+ * @returns true if this plugin can handle the file
46
+ */
47
+ canHandle(filePath: string): boolean;
48
+ /**
49
+ * Initialize plugin with platform context
50
+ *
51
+ * Called once when the plugin is first loaded by the framework.
52
+ * Plugin should setup logger and initialize any visualizer specific dependencies.
53
+ *
54
+ * @param context - Platform context providing file system, logger, etc.
55
+ */
56
+ initialize(context: IPlatformContext): Promise<void>;
57
+ /**
58
+ * Dispose plugin resources
59
+ *
60
+ * Called when the plugin is being unloaded or the extension is deactivating.
61
+ * Plugin should clean up resources, timers, subscriptions, file watchers, etc.
62
+ */
63
+ dispose?(): void;
64
+ }
65
+ //# sourceMappingURL=IVisualizationPlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IVisualizationPlugin.d.ts","sourceRoot":"","sources":["../../../../src/sdk/contracts/core/IVisualizationPlugin.ts"],"names":[],"mappings":"AAAA;;;;;IAKI;AAEJ,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAE/E;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,oBAAoB,CAAC,KAAK,GAAG,GAAG;IAC/C;;;;;;;;OAQG;IACH,qBAAqB,IAAI,kBAAkB,CAAC;IAE5C;;OAEG;IACH,MAAM,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC;IAE/B;;;;;;OAMG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IAErC;;;;;;;OAOG;IACH,UAAU,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErD;;;;;OAKG;IACH,OAAO,CAAC,IAAI,IAAI,CAAC;CAClB"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright (c) 2025, Salesforce, Inc.
3
+ * All rights reserved.
4
+ * Licensed under the BSD 3-Clause license.
5
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ **/
7
+ export {};
8
+ //# sourceMappingURL=IVisualizationPlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IVisualizationPlugin.js","sourceRoot":"","sources":["../../../../src/sdk/contracts/core/IVisualizationPlugin.ts"],"names":[],"mappings":"AAAA;;;;;IAKI"}