@bluestep-systems/b6p-core 0.4.0 → 0.5.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 (116) hide show
  1. package/README.md +29 -13
  2. package/dist/B6PCore.d.ts +38 -80
  3. package/dist/B6PCore.js +52 -385
  4. package/dist/B6PCore.js.map +1 -1
  5. package/dist/B6PUri.d.ts +147 -7
  6. package/dist/B6PUri.js +190 -12
  7. package/dist/B6PUri.js.map +1 -1
  8. package/dist/Err.js.map +1 -1
  9. package/dist/PlatformContext.d.ts +33 -0
  10. package/dist/PlatformContext.js +3 -0
  11. package/dist/PlatformContext.js.map +1 -0
  12. package/dist/auth/BearerAuthProvider.d.ts +64 -0
  13. package/dist/auth/BearerAuthProvider.js +148 -0
  14. package/dist/auth/BearerAuthProvider.js.map +1 -0
  15. package/dist/cache/OrgCache.d.ts +64 -7
  16. package/dist/cache/OrgCache.js +142 -23
  17. package/dist/cache/OrgCache.js.map +1 -1
  18. package/dist/cache/ScriptMetaDataStore.d.ts +2 -2
  19. package/dist/cache/ScriptMetaDataStore.js.map +1 -1
  20. package/dist/constants/ApiEndpoints.js.map +1 -1
  21. package/dist/constants/AuthTypes.d.ts +0 -1
  22. package/dist/constants/AuthTypes.js +0 -1
  23. package/dist/constants/AuthTypes.js.map +1 -1
  24. package/dist/constants/BlueHQ.js.map +1 -1
  25. package/dist/constants/CryptoAlgorithms.js.map +1 -1
  26. package/dist/constants/ExtensionConfig.js.map +1 -1
  27. package/dist/constants/FileExtensions.js.map +1 -1
  28. package/dist/constants/FolderNames.js.map +1 -1
  29. package/dist/constants/GitHubUrls.js.map +1 -1
  30. package/dist/constants/Http.js.map +1 -1
  31. package/dist/constants/MimeTypes.js.map +1 -1
  32. package/dist/constants/Numerical.js.map +1 -1
  33. package/dist/constants/OutputChannels.js.map +1 -1
  34. package/dist/constants/SettingsKeys.js.map +1 -1
  35. package/dist/constants/SpecialFiles.js.map +1 -1
  36. package/dist/constants/WebDAVElements.js.map +1 -1
  37. package/dist/data/DownstairsPathParser.js.map +1 -1
  38. package/dist/data/GlobMatcher.js.map +1 -1
  39. package/dist/data/IdUtility.d.ts +2 -2
  40. package/dist/data/IdUtility.js.map +1 -1
  41. package/dist/data/OrgWorker.js.map +1 -1
  42. package/dist/data/ScriptKey.js.map +1 -1
  43. package/dist/data/ScriptUrlParser.d.ts +4 -3
  44. package/dist/data/ScriptUrlParser.js +2 -1
  45. package/dist/data/ScriptUrlParser.js.map +1 -1
  46. package/dist/index.d.ts +8 -5
  47. package/dist/index.js +7 -4
  48. package/dist/index.js.map +1 -1
  49. package/dist/network/HttpClient.js.map +1 -1
  50. package/dist/network/HttpClientProvider.js.map +1 -1
  51. package/dist/network/StatusCodes.js.map +1 -1
  52. package/dist/persistence/PersistablePseudoMap.d.ts +4 -4
  53. package/dist/persistence/PersistablePseudoMap.js +1 -1
  54. package/dist/persistence/PersistablePseudoMap.js.map +1 -1
  55. package/dist/persistence/PersistenceKeys.d.ts +0 -4
  56. package/dist/persistence/PersistenceKeys.js +0 -4
  57. package/dist/persistence/PersistenceKeys.js.map +1 -1
  58. package/dist/persistence/PrivatePersistanceMap.d.ts +4 -3
  59. package/dist/persistence/PrivatePersistanceMap.js +2 -1
  60. package/dist/persistence/PrivatePersistanceMap.js.map +1 -1
  61. package/dist/persistence/PseudoMap.js.map +1 -1
  62. package/dist/persistence/PublicPersistanceMap.d.ts +3 -3
  63. package/dist/persistence/PublicPersistanceMap.js +1 -1
  64. package/dist/persistence/PublicPersistanceMap.js.map +1 -1
  65. package/dist/persistence/Serializable.js.map +1 -1
  66. package/dist/persistence/SharedFilePersistence.d.ts +3 -3
  67. package/dist/persistence/SharedFilePersistence.js +1 -1
  68. package/dist/persistence/SharedFilePersistence.js.map +1 -1
  69. package/dist/persistence/TypedMap.js.map +1 -1
  70. package/dist/persistence/TypedPersistable.d.ts +5 -5
  71. package/dist/persistence/TypedPersistable.js +2 -2
  72. package/dist/persistence/TypedPersistable.js.map +1 -1
  73. package/dist/persistence/TypedPrivatePersistable.d.ts +3 -3
  74. package/dist/persistence/TypedPrivatePersistable.js +1 -1
  75. package/dist/persistence/TypedPrivatePersistable.js.map +1 -1
  76. package/dist/persistence/dirLockdown.js.map +1 -1
  77. package/dist/providers.d.ts +48 -14
  78. package/dist/script/ScriptContext.d.ts +17 -16
  79. package/dist/script/ScriptFactory.d.ts +23 -16
  80. package/dist/script/ScriptFactory.js +23 -44
  81. package/dist/script/ScriptFactory.js.map +1 -1
  82. package/dist/script/ScriptFile.d.ts +12 -0
  83. package/dist/script/ScriptFile.js +14 -1
  84. package/dist/script/ScriptFile.js.map +1 -1
  85. package/dist/script/ScriptFolder.d.ts +21 -0
  86. package/dist/script/ScriptFolder.js +28 -4
  87. package/dist/script/ScriptFolder.js.map +1 -1
  88. package/dist/script/ScriptNode.js.map +1 -1
  89. package/dist/script/ScriptRoot.js +10 -6
  90. package/dist/script/ScriptRoot.js.map +1 -1
  91. package/dist/script/ScriptService.d.ts +112 -0
  92. package/dist/script/ScriptService.js +411 -0
  93. package/dist/script/ScriptService.js.map +1 -0
  94. package/dist/script/ScriptTranspiler.js.map +1 -1
  95. package/dist/script/SnapshotHistoryRecorder.d.ts +14 -1
  96. package/dist/script/SnapshotHistoryRecorder.js +15 -10
  97. package/dist/script/SnapshotHistoryRecorder.js.map +1 -1
  98. package/dist/script/TsConfig.js.map +1 -1
  99. package/dist/script/TsLibResolver.js.map +1 -1
  100. package/dist/{push.d.ts → script/push.d.ts} +1 -3
  101. package/dist/{push.js → script/push.js} +10 -10
  102. package/dist/script/push.js.map +1 -0
  103. package/dist/session/SessionManager.d.ts +3 -2
  104. package/dist/session/SessionManager.js.map +1 -1
  105. package/dist/testing/MockFileSystem.d.ts +16 -3
  106. package/dist/testing/MockFileSystem.js +65 -42
  107. package/dist/testing/MockFileSystem.js.map +1 -1
  108. package/dist/testing/TestableFactory.d.ts +10 -6
  109. package/dist/types.d.ts +21 -5
  110. package/dist/update/UpdateService.d.ts +2 -2
  111. package/dist/update/UpdateService.js.map +1 -1
  112. package/package.json +12 -14
  113. package/dist/auth/BasicAuthProvider.d.ts +0 -39
  114. package/dist/auth/BasicAuthProvider.js +0 -106
  115. package/dist/auth/BasicAuthProvider.js.map +0 -1
  116. package/dist/push.js.map +0 -1
package/dist/B6PCore.js CHANGED
@@ -1,61 +1,44 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
2
  Object.defineProperty(exports, "__esModule", { value: true });
36
3
  exports.B6PCore = void 0;
37
- const path = __importStar(require("path"));
38
- const BasicAuthProvider_1 = require("./auth/BasicAuthProvider");
39
- const B6PUri_1 = require("./B6PUri");
40
- const ScriptUrlParser_1 = require("./data/ScriptUrlParser");
41
- const DownstairsPathParser_1 = require("./data/DownstairsPathParser");
4
+ const BearerAuthProvider_1 = require("./auth/BearerAuthProvider");
42
5
  const SessionManager_1 = require("./session/SessionManager");
43
- const push_1 = require("./push");
44
6
  const ScriptMetaDataStore_1 = require("./cache/ScriptMetaDataStore");
45
7
  const OrgCache_1 = require("./cache/OrgCache");
46
- const ScriptFactory_1 = require("./script/ScriptFactory");
8
+ const ScriptService_1 = require("./script/ScriptService");
47
9
  const UpdateService_1 = require("./update/UpdateService");
48
10
  const NOOP_ORG_CACHE_SETTINGS = {
49
11
  getParsedAnyDomainOverrideUrl: () => null,
50
12
  };
51
13
  /**
52
- * Headless orchestrator for all B6P operations.
14
+ * Headless SDK entry point for the BlueStep platform.
53
15
  *
54
16
  * Consumers (VS Code extension, CLI, tests) construct this with their own
55
- * {@link B6PProviders} implementations, then call the command methods.
17
+ * {@link B6PProviders} implementations, then reach the platform through it.
18
+ *
19
+ * This class is a **composition root**: it owns the platform-facing singletons
20
+ * (auth, session, caches) and assembles the subsystem services that use them.
21
+ * Script management lives behind {@link B6PCore.script}, not on this class —
22
+ * `core.script.push(...)`, `core.script.pull(...)` — leaving room for further
23
+ * subsystems (forms, users, reporting) to sit beside it without turning this into
24
+ * a flat bag of every operation the platform supports.
25
+ *
26
+ * The five raw providers are **private on purpose**, and the reason is not
27
+ * stylistic. Re-publishing them bought a consumer nothing — it already holds the
28
+ * objects it passed in — while costing two things. First, a subsystem could then
29
+ * reach `core.persistence` instead of receiving a bundle, which is exactly the
30
+ * accretion {@link ScriptContext} was cleaned up to stop. Second, and worse, an
31
+ * earlier revision of this comment claimed the class "deliberately does not
32
+ * implement any of the interfaces it hands out" while `const ctx: ScriptContext =
33
+ * core` still type-checked: dropping the `implements` clause removed the
34
+ * declaration, not the structural conformance, because these fields supplied every
35
+ * member. TypeScript is structural — the same trap `CLAUDE.md` documents for
36
+ * `AuthParams`. Making them private is what makes the claim true instead of
37
+ * decorative. Do not widen them back to `readonly`.
56
38
  *
57
39
  * This class contains zero `vscode.*` imports — all platform-specific
58
40
  * behaviour is delegated to the providers.
41
+ * @lastreviewed null
59
42
  */
60
43
  class B6PCore {
61
44
  fs;
@@ -68,8 +51,11 @@ class B6PCore {
68
51
  scriptMetadataStore;
69
52
  orgCache;
70
53
  updateService = null;
71
- typescriptLibDirs;
72
- factory = null;
54
+ /**
55
+ * Script management: push, pull, audit, deploy, and setup-URL resolution.
56
+ * @lastreviewed null
57
+ */
58
+ script;
73
59
  _isDebugMode;
74
60
  constructor(providers) {
75
61
  this.fs = providers.fs;
@@ -77,320 +63,39 @@ class B6PCore {
77
63
  this.prompt = providers.prompt;
78
64
  this.logger = providers.logger;
79
65
  this.progress = providers.progress;
80
- this.typescriptLibDirs = providers.typescriptLibDirs;
81
66
  this._isDebugMode = providers.isDebugMode ?? (() => false);
82
- this.auth = new BasicAuthProvider_1.BasicAuthProvider(this.persistence, this.prompt, this.logger);
67
+ this.auth = providers.auth ?? new BearerAuthProvider_1.BearerAuthProvider(this.persistence, this.prompt, this.logger);
83
68
  this.sessionManager = new SessionManager_1.SessionManager(this.persistence, this.logger, this.auth, this._isDebugMode, this.prompt, providers.fetchFn);
84
69
  this.scriptMetadataStore = new ScriptMetaDataStore_1.ScriptMetaDataStore(this.persistence);
85
70
  this.orgCache = new OrgCache_1.OrgCache(this.persistence, this.logger, providers.orgCacheSettings ?? NOOP_ORG_CACHE_SETTINGS, this._isDebugMode, this.prompt);
71
+ // The shared half of every subsystem's dependency bundle, built once. A second
72
+ // service spreads this same object and adds only what is specific to it, so the
73
+ // members below have one construction site rather than one per subsystem.
74
+ // Absent by design: `auth` (only SessionManager consumes it) and `persistence`
75
+ // (subsystems reach storage through the typed stores above, never the raw key
76
+ // space).
77
+ const platform = {
78
+ fs: this.fs,
79
+ sessionManager: this.sessionManager,
80
+ logger: this.logger,
81
+ prompt: this.prompt,
82
+ progress: this.progress,
83
+ isDebugMode: this._isDebugMode,
84
+ };
85
+ this.script = new ScriptService_1.ScriptService({
86
+ ...platform,
87
+ scriptMetadataStore: this.scriptMetadataStore,
88
+ orgCache: this.orgCache,
89
+ typescriptLibDirs: providers.typescriptLibDirs,
90
+ });
86
91
  // Initialize update service if configuration is provided
87
92
  if (providers.updateServiceConfig) {
88
93
  this.updateService = new UpdateService_1.UpdateService(this.persistence, this.logger, providers.updateServiceConfig, providers.fetchFn);
89
94
  }
90
95
  }
91
- getScriptFactory() {
92
- if (!this.factory) {
93
- this.factory = new ScriptFactory_1.ScriptFactory(this);
94
- }
95
- return this.factory;
96
- }
97
96
  isDebugMode() {
98
97
  return this._isDebugMode();
99
98
  }
100
- /**
101
- * Create a ScriptUrlParser wired to this core's session and logger.
102
- */
103
- createParser(url) {
104
- return new ScriptUrlParser_1.ScriptUrlParser(url, this.sessionManager, this.logger, this.prompt);
105
- }
106
- /**
107
- * Derive the base WebDAV URL from a local file path by parsing the
108
- * downstairs path structure and looking up stored metadata.
109
- */
110
- async deriveBaseUrl(filePath, _workspacePath) {
111
- try {
112
- const sf = this.getScriptFactory().createFile(B6PUri_1.B6PUri.fromFsPath(filePath));
113
- return sf.getScriptRoot().getBaseWebDavUrlString();
114
- }
115
- catch {
116
- this.logger.warn(`Could not parse downstairs path: ${filePath}`);
117
- return null;
118
- }
119
- }
120
- /**
121
- * Derive the workspace folder (parent of the org folder) from a file path
122
- * inside a script root. Returns null if the path can't be parsed.
123
- */
124
- deriveWorkspacePath(filePath) {
125
- try {
126
- const sf = this.getScriptFactory().createFile(B6PUri_1.B6PUri.fromFsPath(filePath));
127
- return sf.getScriptRoot().getOrgUri().dirname.fsPath;
128
- }
129
- catch {
130
- return null;
131
- }
132
- }
133
- // ── Push / Pull ───────────────────────────────────────────────────
134
- async push(opts) {
135
- const targetUrl = opts.targetUrl ?? (await this.prompt.inputBox({ prompt: "Paste in the target formula URI" }));
136
- if (targetUrl === undefined) {
137
- this.prompt.error("No target formula URI provided");
138
- return;
139
- }
140
- this.logger.info(`Pushing script from ${opts.rootPath} to ${targetUrl}${opts.snapshot ? " (snapshot)" : ""}`);
141
- await (0, push_1.executePush)({
142
- ctx: this,
143
- progress: this.progress,
144
- targetUrl,
145
- rootPath: opts.rootPath,
146
- snapshot: opts.snapshot ?? false,
147
- message: opts.message,
148
- });
149
- }
150
- async pushCurrent(opts) {
151
- this.logger.info(`Push current for file: ${opts.filePath}`);
152
- const baseUrl = await this.deriveBaseUrl(opts.filePath, "");
153
- if (!baseUrl) {
154
- const url = await this.prompt.inputBox({
155
- prompt: "Could not determine script URL. Paste the target formula URI:",
156
- });
157
- if (!url) {
158
- return;
159
- }
160
- // Derive rootPath from the file's path structure
161
- const parser = new DownstairsPathParser_1.DownstairsPathParser(opts.filePath);
162
- await this.push({
163
- targetUrl: url,
164
- rootPath: parser.getShavedName(),
165
- snapshot: opts.snapshot,
166
- message: opts.message,
167
- });
168
- return;
169
- }
170
- const parser = new DownstairsPathParser_1.DownstairsPathParser(opts.filePath);
171
- await this.push({
172
- targetUrl: baseUrl,
173
- rootPath: parser.getShavedName(),
174
- snapshot: opts.snapshot,
175
- message: opts.message,
176
- });
177
- }
178
- async pull(opts) {
179
- const formulaUrl = opts.formulaUrl ?? (await this.prompt.inputBox({ prompt: "Paste in the desired formula URL" }));
180
- if (formulaUrl === undefined) {
181
- this.prompt.error("No formula URL provided");
182
- return;
183
- }
184
- this.logger.info(`Pulling script from ${formulaUrl} into ${opts.workspacePath}`);
185
- const parser = this.createParser(formulaUrl);
186
- const fetchedScriptObject = await parser.getScript();
187
- if (!fetchedScriptObject) {
188
- this.logger.warn("fetchedScriptObject is null");
189
- return;
190
- }
191
- const U = await parser.getU();
192
- const scriptName = await parser.getScriptName();
193
- this.logger.info(`Resolved script name: "${scriptName}" (webdavId: ${parser.webDavId})`);
194
- // Guard against a known bug where getScriptName() returns the name of a
195
- // recently-pulled script instead of the correct one (observed when two
196
- // merge reports share a common name prefix, e.g. "Test_Green" and
197
- // "Test_bp6_CLI"). If the resolved name is already linked to a *different*
198
- // webdavId in local metadata, aborting here prevents overwriting the wrong
199
- // directory and corrupting both scripts.
200
- await this.scriptMetadataStore.whenReady();
201
- const conflictingEntry = this.scriptMetadataStore.findByScriptName(U, scriptName);
202
- if (conflictingEntry && conflictingEntry.webdavId !== parser.webDavId) {
203
- this.prompt.error(`Pull aborted: the server returned script name "${scriptName}" for webdavId ${parser.webDavId}, ` +
204
- `but that name is already linked locally to webdavId ${conflictingEntry.webdavId}. ` +
205
- `Proceeding would overwrite the wrong directory. ` +
206
- `Please report this issue — try pulling again or clearing your local metadata.`);
207
- return;
208
- }
209
- const factory = this.getScriptFactory();
210
- const pullTasks = fetchedScriptObject.map((entry) => ({
211
- execute: async () => {
212
- const ultimatePath = path.join(opts.workspacePath, U, entry.downstairsPath);
213
- const isDirectory = ultimatePath.endsWith("/") || entry.downstairsPath.endsWith("/");
214
- if (isDirectory) {
215
- const uri = B6PUri_1.B6PUri.fromFsPath(ultimatePath);
216
- if (!(await this.fs.exists(uri))) {
217
- await this.fs.createDirectory(uri);
218
- }
219
- }
220
- else {
221
- // Use ScriptFile.download() so that we get gitignore filtering, ETag-based
222
- // integrity verification, and `lastPulled` metadata tracking — all the
223
- // behaviour the previous inline fetch+writeFile loop was missing.
224
- const fileUri = B6PUri_1.B6PUri.fromFsPath(ultimatePath);
225
- const scriptRoot = factory.createScriptRoot(fileUri);
226
- scriptRoot.withParser(parser);
227
- const file = factory.createFile(fileUri, scriptRoot);
228
- // Make sure the parent directory exists before download writes the file.
229
- const parentUri = fileUri.dirname;
230
- if (!(await this.fs.exists(parentUri))) {
231
- await this.fs.createDirectory(parentUri);
232
- }
233
- await file.download(parser);
234
- }
235
- return ultimatePath;
236
- },
237
- description: "scripts",
238
- }));
239
- // Coalesce the per-script metadata writes into a single atomic write at the
240
- // end of the pull. Each task's upsert would otherwise rewrite state.json in
241
- // a rapid burst, which trips AV / ransomware heuristics on Windows (see the
242
- // retry logic in SharedFilePersistence). On a failed pull the finally still
243
- // makes a best-effort flush of what was pulled so far; if that flush also
244
- // fails it is logged (not thrown) so the pull's own error is what surfaces.
245
- await this.scriptMetadataStore.beginBatch();
246
- let pullSucceeded = false;
247
- try {
248
- await this.progress.withProgress(pullTasks, {
249
- title: "Pulling Script...",
250
- cleanupMessage: "Cleaning up the downstairs folder...",
251
- });
252
- pullSucceeded = true;
253
- }
254
- finally {
255
- try {
256
- await this.scriptMetadataStore.flush();
257
- }
258
- catch (flushError) {
259
- // If the pull itself failed, that error is the useful one — keep it and
260
- // don't let a failed metadata flush mask it. Only surface the flush
261
- // error when the pull otherwise succeeded.
262
- if (pullSucceeded) {
263
- throw flushError;
264
- }
265
- this.logger.error(`Failed to flush script metadata after a failed pull: ${String(flushError)}`);
266
- }
267
- }
268
- this.prompt.info("Pull complete!");
269
- }
270
- async pullCurrent(opts) {
271
- const baseUrl = await this.deriveBaseUrl(opts.filePath, opts.workspacePath);
272
- if (!baseUrl) {
273
- const url = await this.prompt.inputBox({ prompt: "Could not determine script URL. Paste the formula URL:" });
274
- if (!url) {
275
- return;
276
- }
277
- await this.pull({ formulaUrl: url, workspacePath: opts.workspacePath });
278
- return;
279
- }
280
- await this.pull({ formulaUrl: baseUrl, workspacePath: opts.workspacePath });
281
- }
282
- // ── Audit ─────────────────────────────────────────────────────────
283
- async audit(opts) {
284
- this.logger.info(`Auditing file: ${opts.filePath}`);
285
- const baseUrl = await this.deriveBaseUrl(opts.filePath, opts.workspacePath);
286
- if (!baseUrl) {
287
- const url = await this.prompt.inputBox({ prompt: "Could not determine script URL. Paste the formula URL:" });
288
- if (!url) {
289
- return null;
290
- }
291
- return this.auditWithUrl(url, opts.workspacePath);
292
- }
293
- return this.auditWithUrl(baseUrl, opts.workspacePath);
294
- }
295
- async auditWithUrl(baseUrl, workspacePath) {
296
- const parser = this.createParser(baseUrl);
297
- const fetchedScriptObject = await parser.getScript();
298
- if (!fetchedScriptObject) {
299
- this.logger.warn("fetchedScriptObject is null during audit");
300
- return null;
301
- }
302
- const U = await parser.getU();
303
- const changedFiles = [];
304
- const factory = this.getScriptFactory();
305
- for (const entry of fetchedScriptObject) {
306
- const ultimatePath = path.join(workspacePath, U, entry.downstairsPath);
307
- if (ultimatePath.endsWith("/") || entry.downstairsPath.endsWith("/")) {
308
- continue; // skip directories
309
- }
310
- const fileUri = B6PUri_1.B6PUri.fromFsPath(ultimatePath);
311
- if (!(await this.fs.exists(fileUri))) {
312
- changedFiles.push(entry.downstairsPath + " (new)");
313
- continue;
314
- }
315
- // Use ScriptFile.currentIntegrityStatus() so that we get the same robust ETag handling
316
- // (standard / weak / numeric / complex) used by download(). Files served with numeric or
317
- // complex ETags (declaration/library files) expose no content hash, so their status is
318
- // "indeterminate" — we cannot assert a difference and must not report them as changed,
319
- // exactly as download() skips their integrity verification. Only a genuine "mismatch",
320
- // where both hashes are known and differ, counts as a changed file.
321
- const scriptRoot = factory.createScriptRoot(fileUri);
322
- scriptRoot.withParser(parser);
323
- const file = factory.createFile(fileUri, scriptRoot);
324
- const upstairsOverride = new URL(entry.upstairsPath);
325
- const status = await file.currentIntegrityStatus({ upstairsOverride });
326
- if (status === "mismatch") {
327
- changedFiles.push(entry.downstairsPath);
328
- }
329
- else if (status === "indeterminate") {
330
- this.logger.debug(`Skipping ${entry.downstairsPath}: server exposes no content hash to compare against`);
331
- }
332
- }
333
- if (changedFiles.length === 0) {
334
- this.prompt.info("No differences detected. Local script is in sync with the server.");
335
- }
336
- else {
337
- this.prompt.info(`Detected ${changedFiles.length} file(s) with differences:\n\n${changedFiles.join("\n")}`);
338
- }
339
- return { changedFiles, baseUrl };
340
- }
341
- async auditPull(opts) {
342
- const result = await this.audit(opts);
343
- if (!result || result.changedFiles.length === 0) {
344
- return;
345
- }
346
- const YES = "Sync";
347
- const NO = "Cancel";
348
- const response = await this.prompt.confirm(`Detected ${result.changedFiles.length} file(s) with differences:\n\n${result.changedFiles.join("\n")}\n\nSync local copy with the server?`, [YES, NO]);
349
- if (response !== YES) {
350
- this.logger.info("User declined audit-pull sync");
351
- return;
352
- }
353
- await this.pull({ formulaUrl: result.baseUrl, workspacePath: opts.workspacePath });
354
- }
355
- // ── Deploy ────────────────────────────────────────────────────────
356
- async deploy(opts) {
357
- this.logger.info(`Quick deploy from config: ${opts.configPath}`);
358
- // Read config file
359
- const configUri = B6PUri_1.B6PUri.fromFsPath(opts.configPath);
360
- if (!(await this.fs.exists(configUri))) {
361
- this.prompt.error(`Config file not found: ${opts.configPath}`);
362
- return;
363
- }
364
- const configContent = await this.fs.readFile(configUri);
365
- const configText = Buffer.from(configContent).toString("utf-8");
366
- let config;
367
- try {
368
- config = JSON.parse(configText);
369
- }
370
- catch (error) {
371
- this.prompt.error(`Failed to parse config file: ${error instanceof Error ? error.message : error}`);
372
- return;
373
- }
374
- if (!config.sourceRootPath || !config.targets || config.targets.length === 0) {
375
- this.prompt.error("Invalid config file. Required fields: sourceRootPath, targets[]");
376
- return;
377
- }
378
- this.logger.info(`Deploying to ${config.targets.length} target(s)`);
379
- for (const target of config.targets) {
380
- this.logger.info(`Deploying to: ${target.url}`);
381
- try {
382
- await this.push({
383
- targetUrl: target.url,
384
- rootPath: config.sourceRootPath,
385
- snapshot: target.snapshot ?? false,
386
- });
387
- }
388
- catch (error) {
389
- this.logger.error(`Failed to deploy to ${target.url}: ${error instanceof Error ? error.message : error}`);
390
- }
391
- }
392
- this.prompt.info("Deploy complete!");
393
- }
394
99
  // ── Credentials ───────────────────────────────────────────────────
395
100
  async updateCredentials() {
396
101
  await this.auth.update();
@@ -414,7 +119,7 @@ class B6PCore {
414
119
  // ── State ─────────────────────────────────────────────────────────
415
120
  async report() {
416
121
  // Note: This is a basic implementation. Full functionality requires
417
- // IPersistence to support listing keys by prefix.
122
+ // Persistence to support listing keys by prefix.
418
123
  this.logger.info("Generating state report...");
419
124
  const details = [
420
125
  "Script Metadata and Org Cache reporting requires persistence layer",
@@ -461,44 +166,6 @@ class B6PCore {
461
166
  async getConfig(key) {
462
167
  return this.persistence.get(`settings.${key}`);
463
168
  }
464
- // ── Setup URL ─────────────────────────────────────────────────────
465
- /**
466
- * Builds the web-UI setup URL for a locally-pulled script, resolving its
467
- * stored metadata (org, classid, seqnum) from the {@link ScriptMetaDataStore}
468
- * the same way `audit` and `push` do.
469
- * @param opts.filePath Absolute path to any file inside the pulled script root.
470
- * @returns The setup URL, or `null` if no metadata is stored for the script
471
- * (not yet pulled) or its script type has no known setup page.
472
- * @lastreviewed null
473
- */
474
- async getSetupUrl(opts) {
475
- try {
476
- // Resolve stored metadata via the same script-root mechanism that `audit`
477
- // and `push` use, rather than a raw `scriptMeta.<name>` persistence key
478
- // that `pull` never writes. The metadata store is keyed by U + scriptName;
479
- // the ScriptRoot derives both from the file path.
480
- const root = this.getScriptFactory().createFile(B6PUri_1.B6PUri.fromFsPath(opts.filePath)).getScriptRoot();
481
- const meta = await root.getMetaData();
482
- if (!meta) {
483
- const scriptName = new DownstairsPathParser_1.DownstairsPathParser(opts.filePath).scriptName;
484
- this.prompt.error(`No stored metadata found for script "${scriptName}". Pull the script first.`);
485
- return null;
486
- }
487
- // The ScriptKey (classid + seqnum) knows its own setup page and can build
488
- // the setup URL against the org's origin.
489
- const scriptKey = await root.getScriptKey();
490
- if (!scriptKey.setupPage) {
491
- this.prompt.error(`Unknown script type (classid: ${scriptKey.classid}). Cannot generate setup URL.`);
492
- return null;
493
- }
494
- const origin = await root.anyOrigin();
495
- return scriptKey.buildSetupUrl(origin);
496
- }
497
- catch (error) {
498
- this.logger.error(`Error generating setup URL: ${error instanceof Error ? error.message : error}`);
499
- return null;
500
- }
501
- }
502
169
  /**
503
170
  * Dispose resources (session cleanup timer, etc.).
504
171
  */
@@ -1 +1 @@
1
- {"version":3,"file":"B6PCore.js","sourceRoot":"","sources":["../src/B6PCore.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,gEAA6D;AAC7D,qCAAkC;AAClC,4DAAyD;AACzD,sEAAmE;AACnE,6DAA0D;AAE1D,iCAAqC;AACrC,qEAAkE;AAClE,+CAA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