@bluestep-systems/b6p-core 0.6.1 → 0.8.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.
- package/README.md +43 -0
- package/dist/Err.d.ts +15 -0
- package/dist/Err.js +20 -0
- package/dist/Err.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/providers.d.ts +32 -1
- package/dist/script/ScriptFile.d.ts +92 -0
- package/dist/script/ScriptFile.js +196 -35
- package/dist/script/ScriptFile.js.map +1 -1
- package/dist/script/ScriptFolder.d.ts +1 -0
- package/dist/script/ScriptFolder.js.map +1 -1
- package/dist/script/ScriptNode.d.ts +2 -0
- package/dist/script/ScriptNode.js.map +1 -1
- package/dist/script/ScriptRoot.d.ts +14 -1
- package/dist/script/ScriptRoot.js +22 -6
- package/dist/script/ScriptRoot.js.map +1 -1
- package/dist/script/ScriptService.d.ts +10 -0
- package/dist/script/ScriptService.js +13 -1
- package/dist/script/ScriptService.js.map +1 -1
- package/dist/script/ScriptTranspiler.d.ts +78 -6
- package/dist/script/ScriptTranspiler.js +137 -27
- package/dist/script/ScriptTranspiler.js.map +1 -1
- package/dist/script/push.d.ts +213 -1
- package/dist/script/push.js +336 -18
- package/dist/script/push.js.map +1 -1
- package/package.json +2 -2
package/dist/script/push.js
CHANGED
|
@@ -32,10 +32,19 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
32
32
|
return result;
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
35
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.checkEmittedEntrypoint = checkEmittedEntrypoint;
|
|
40
|
+
exports.verifyLiveSnapshot = verifyLiveSnapshot;
|
|
41
|
+
exports.collectOverwriteCandidates = collectOverwriteCandidates;
|
|
42
|
+
exports.confirmOverwrites = confirmOverwrites;
|
|
36
43
|
exports.executePush = executePush;
|
|
44
|
+
exports.cleanupUnusedUpstairsPaths = cleanupUnusedUpstairsPaths;
|
|
37
45
|
const path = __importStar(require("path"));
|
|
38
46
|
const fast_xml_parser_1 = require("fast-xml-parser");
|
|
47
|
+
const typescript_1 = __importDefault(require("typescript"));
|
|
39
48
|
const constants_1 = require("../constants");
|
|
40
49
|
const B6PUri_1 = require("../B6PUri");
|
|
41
50
|
const GlobMatcher_1 = require("../data/GlobMatcher");
|
|
@@ -43,6 +52,8 @@ const ScriptUrlParser_1 = require("../data/ScriptUrlParser");
|
|
|
43
52
|
const ScriptFactory_1 = require("./ScriptFactory");
|
|
44
53
|
const SnapshotHistoryRecorder_1 = require("./SnapshotHistoryRecorder");
|
|
45
54
|
const Err_1 = require("../Err");
|
|
55
|
+
const ScriptFile_1 = require("./ScriptFile");
|
|
56
|
+
const TsConfig_1 = require("./TsConfig");
|
|
46
57
|
/**
|
|
47
58
|
* Recursively collect all files under a directory.
|
|
48
59
|
*/
|
|
@@ -81,6 +92,183 @@ async function readGitIgnorePatterns(rootPath, fs) {
|
|
|
81
92
|
return ["**/.DS_Store"];
|
|
82
93
|
}
|
|
83
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* Statements the compiler writes into a module with no code of its own: the ES module marker a
|
|
97
|
+
* types-only file compiles to, and the CommonJS preamble. Compared token by token, so spacing and
|
|
98
|
+
* comments don't matter.
|
|
99
|
+
* @lastreviewed null
|
|
100
|
+
*/
|
|
101
|
+
const EMPTY_MODULE_STATEMENTS = [
|
|
102
|
+
"export{};",
|
|
103
|
+
'"use strict";',
|
|
104
|
+
"'use strict';",
|
|
105
|
+
'Object.defineProperty(exports,"__esModule",{value:true});',
|
|
106
|
+
];
|
|
107
|
+
/**
|
|
108
|
+
* Whether compiled JavaScript has code beyond comments and {@link EMPTY_MODULE_STATEMENTS}. The
|
|
109
|
+
* compiler always appends an inline source map comment, so a blank `app.ts` never compiles to a
|
|
110
|
+
* blank file; the TypeScript scanner drops comments and whitespace as trivia.
|
|
111
|
+
* @param js The compiled file's text
|
|
112
|
+
* @lastreviewed null
|
|
113
|
+
*/
|
|
114
|
+
function hasCode(js) {
|
|
115
|
+
const scanner = typescript_1.default.createScanner(typescript_1.default.ScriptTarget.Latest, true, typescript_1.default.LanguageVariant.Standard, js);
|
|
116
|
+
let tokens = "";
|
|
117
|
+
for (let kind = scanner.scan(); kind !== typescript_1.default.SyntaxKind.EndOfFileToken; kind = scanner.scan()) {
|
|
118
|
+
tokens += scanner.getTokenText();
|
|
119
|
+
}
|
|
120
|
+
for (const statement of EMPTY_MODULE_STATEMENTS) {
|
|
121
|
+
tokens = tokens.split(statement).join("");
|
|
122
|
+
}
|
|
123
|
+
return tokens.length > 0;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Pre-publish check for a snapshot push: after the compile, the entrypoint the platform runtime
|
|
127
|
+
* loads must be there. The runtime resolves `scripts/app` to `<build folder>/scripts/app.js`; if
|
|
128
|
+
* that file is missing or has no code, publishing it breaks the live version (a missing one fails
|
|
129
|
+
* with `NoSuchFileException .../scripts/app`, one with no code answers an empty `200`), so the push
|
|
130
|
+
* must stop before any upload (ClickUp 86bbqnrtp).
|
|
131
|
+
*
|
|
132
|
+
* Only the entrypoint is checked. A helper module may legitimately compile to almost nothing, so
|
|
133
|
+
* checking every emitted file would stop good pushes. The transpiler sets `rootDir` to the
|
|
134
|
+
* tsconfig's folder, which is why `scripts/app.ts` always maps to `<build folder>/scripts/app.js`.
|
|
135
|
+
* @param opts.draftPath The draft folder
|
|
136
|
+
* @param opts.buildFolderPath The draft-root tsconfig's build folder ({@link ScriptRoot.getDraftBuildFolder})
|
|
137
|
+
* @param opts.fs The file system to read
|
|
138
|
+
* @returns What was found, and the path it looked at
|
|
139
|
+
* @lastreviewed null
|
|
140
|
+
*/
|
|
141
|
+
async function checkEmittedEntrypoint(opts) {
|
|
142
|
+
const { draftPath, buildFolderPath, fs } = opts;
|
|
143
|
+
const emittedPath = path.join(buildFolderPath, constants_1.FolderNames.SCRIPTS, "app" + constants_1.FileExtensions.JAVASCRIPT);
|
|
144
|
+
const sourceUri = B6PUri_1.B6PUri.fromFsPath(path.join(draftPath, constants_1.FolderNames.SCRIPTS, "app" + constants_1.FileExtensions.TYPESCRIPT));
|
|
145
|
+
if (!(await fs.exists(sourceUri))) {
|
|
146
|
+
return { status: "no-source", emittedPath };
|
|
147
|
+
}
|
|
148
|
+
const emittedUri = B6PUri_1.B6PUri.fromFsPath(emittedPath);
|
|
149
|
+
if (!(await fs.exists(emittedUri))) {
|
|
150
|
+
return { status: "missing", emittedPath };
|
|
151
|
+
}
|
|
152
|
+
const text = Buffer.from(await fs.readFile(emittedUri)).toString("utf-8");
|
|
153
|
+
return { status: hasCode(text) ? "ok" : "empty", emittedPath };
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* How the read-back retry warning describes each failed status.
|
|
157
|
+
* @lastreviewed null
|
|
158
|
+
*/
|
|
159
|
+
const READ_BACK_PROBLEMS = {
|
|
160
|
+
mismatch: "doesn't match what was pushed",
|
|
161
|
+
missing: "is missing (404)",
|
|
162
|
+
unreadable: "could not be read back",
|
|
163
|
+
};
|
|
164
|
+
/**
|
|
165
|
+
* Post-publish read-back for a snapshot push: `HEAD`s the `snapshot/` copy of each file the push
|
|
166
|
+
* wrote and compares its ETag with the local SHA-512. The platform can accept a write (2xx) and
|
|
167
|
+
* still serve different bytes, e.g. an empty or cut-off file, so a clean upload alone doesn't prove
|
|
168
|
+
* the live version is right (ClickUp 86bbqnrtp).
|
|
169
|
+
*
|
|
170
|
+
* A copy that differs, is missing (`404`) or can't be read (another non-2xx) is re-sent once and
|
|
171
|
+
* checked again; a re-send the platform refuses leaves it a mismatch. Only a 2xx without a content
|
|
172
|
+
* hash is indeterminate. Files are checked one at a time, in the order given.
|
|
173
|
+
* @param files The files this push wrote to `snapshot/`
|
|
174
|
+
* @param ctx Where the retries are logged
|
|
175
|
+
* @returns The files still mismatched, and the ones that could not be compared
|
|
176
|
+
* @lastreviewed null
|
|
177
|
+
*/
|
|
178
|
+
async function verifyLiveSnapshot(files, ctx) {
|
|
179
|
+
const check = { mismatches: [], indeterminate: [] };
|
|
180
|
+
for (const file of files) {
|
|
181
|
+
const snapshotUrl = ScriptFile_1.ScriptFile.snapshotUrl(await file.upstairsUrl());
|
|
182
|
+
const relative = file.pathWithRespectToDraftRoot().split(path.sep).join("/");
|
|
183
|
+
let status = await file.readBackStatus(snapshotUrl);
|
|
184
|
+
if (status === "mismatch" || status === "missing" || status === "unreadable") {
|
|
185
|
+
ctx.logger.warn(`Live copy of ${relative} ${READ_BACK_PROBLEMS[status]}; sending it again: ${snapshotUrl}`);
|
|
186
|
+
try {
|
|
187
|
+
await file.putTo(snapshotUrl);
|
|
188
|
+
status = await file.readBackStatus(snapshotUrl);
|
|
189
|
+
}
|
|
190
|
+
catch (e) {
|
|
191
|
+
ctx.logger.warn(`Re-sending ${relative} failed: ${e instanceof Error ? e.message : e}`);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
if (status === "indeterminate") {
|
|
195
|
+
check.indeterminate.push(relative);
|
|
196
|
+
}
|
|
197
|
+
else if (status !== "match") {
|
|
198
|
+
check.mismatches.push(relative);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return check;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Finds the files of a push whose upload would overwrite a platform version nobody here has seen,
|
|
205
|
+
* by the rule in {@link ScriptFile.platformChangeAtRisk}. Files the push won't upload anyway
|
|
206
|
+
* (ignored, declarations, already in sync) are left out, so they are never asked about.
|
|
207
|
+
*
|
|
208
|
+
* Reads the platform one file at a time. The skip check it runs is cached on each file, so the
|
|
209
|
+
* upload that follows doesn't repeat it.
|
|
210
|
+
* @param files The push's files, the same instances the upload will use
|
|
211
|
+
* @param opts.isSnapshot Whether the push also publishes to `snapshot/`
|
|
212
|
+
* @returns The files at risk, in the order given
|
|
213
|
+
* @lastreviewed null
|
|
214
|
+
*/
|
|
215
|
+
async function collectOverwriteCandidates(files, opts) {
|
|
216
|
+
const candidates = [];
|
|
217
|
+
for (const file of files) {
|
|
218
|
+
if (await file.getReasonToNotPush({ isSnapshot: opts.isSnapshot })) {
|
|
219
|
+
continue;
|
|
220
|
+
}
|
|
221
|
+
const risk = await file.platformChangeAtRisk();
|
|
222
|
+
if (risk) {
|
|
223
|
+
candidates.push({ file, path: file.pathWithRespectToDraftRoot().split(path.sep).join("/"), risk });
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return candidates;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* The push's one overwrite confirmation (ClickUp 86bbjennm). Before anything is uploaded, it finds
|
|
230
|
+
* every file at risk ({@link collectOverwriteCandidates}) and asks once for all of them, so an
|
|
231
|
+
* answer, or the lack of one, can no longer leave a push half done. Files the caller already
|
|
232
|
+
* confirmed in `preConfirmed` are not asked about: that is how a consumer confirms without a
|
|
233
|
+
* prompt, e.g. from a flag.
|
|
234
|
+
* @param opts.files The push's files, the same instances the upload will use
|
|
235
|
+
* @param opts.ctx Where the prompt goes
|
|
236
|
+
* @param opts.isSnapshot Whether the push also publishes to `snapshot/`
|
|
237
|
+
* @param opts.preConfirmed Draft-relative paths (`/`- or `\`-separated) the caller confirms up front
|
|
238
|
+
* @returns The files whose overwrite is confirmed; `upload()` skips its own prompt for them
|
|
239
|
+
* @throws an {@link Err.OverwriteDeclinedError} listing the files, when the answer is anything but
|
|
240
|
+
* "Overwrite all". Nothing has been uploaded at that point.
|
|
241
|
+
* @lastreviewed null
|
|
242
|
+
*/
|
|
243
|
+
async function confirmOverwrites(opts) {
|
|
244
|
+
const { prompt } = opts.ctx;
|
|
245
|
+
const preConfirmed = new Set((opts.preConfirmed ?? []).map((p) => p.replace(/\\/g, "/").replace(/^\.\//, "")));
|
|
246
|
+
const candidates = await collectOverwriteCandidates(opts.files, { isSnapshot: opts.isSnapshot });
|
|
247
|
+
const confirmed = new Set(candidates.filter((c) => preConfirmed.has(c.path)).map((c) => c.file));
|
|
248
|
+
const toAsk = candidates.filter((c) => !preConfirmed.has(c.path));
|
|
249
|
+
if (toAsk.length === 0) {
|
|
250
|
+
return confirmed;
|
|
251
|
+
}
|
|
252
|
+
const why = (c) => c.risk === "changed"
|
|
253
|
+
? "changed on the platform since the last push or pull from here"
|
|
254
|
+
: "the platform has a different copy, never pulled or pushed from this machine";
|
|
255
|
+
const list = toAsk.map((c) => `${c.path} (${why(c)})`).join("\n");
|
|
256
|
+
// "Cancel" is FIRST: an empty answer and the CLI's --yes both take options[0] (ClickUp 86bc2h3ef).
|
|
257
|
+
const CANCEL = "Cancel";
|
|
258
|
+
const OVERWRITE_ALL = "Overwrite all";
|
|
259
|
+
const answer = await prompt.confirm(`${toAsk.length} file(s) would overwrite a platform version nobody here has seen:\n\n${list}\n\n` +
|
|
260
|
+
`Nothing has been uploaded yet. Overwrite all of them with your local files?`, [CANCEL, OVERWRITE_ALL], { destructive: true, safeOption: CANCEL });
|
|
261
|
+
if (answer !== OVERWRITE_ALL) {
|
|
262
|
+
const kind = opts.isSnapshot ? "Snapshot push" : "Push";
|
|
263
|
+
await prompt.popup(`${kind} cancelled: nothing was uploaded.`);
|
|
264
|
+
// What was kept and why; how to confirm is the consumer's to say (it gets `paths`).
|
|
265
|
+
throw new Err_1.Err.OverwriteDeclinedError(`${kind} stopped before uploading anything: ${toAsk.length} file(s) were not overwritten, because ` +
|
|
266
|
+
`each would overwrite a platform version nobody here has seen:\n\n${list}\n\n` +
|
|
267
|
+
`Pull or audit them to see the platform versions before overwriting them.`, toAsk.map((c) => c.path));
|
|
268
|
+
}
|
|
269
|
+
toAsk.forEach((c) => confirmed.add(c.file));
|
|
270
|
+
return confirmed;
|
|
271
|
+
}
|
|
84
272
|
/**
|
|
85
273
|
* Core push implementation.
|
|
86
274
|
*
|
|
@@ -90,15 +278,32 @@ async function readGitIgnorePatterns(rootPath, fs) {
|
|
|
90
278
|
* - snapshot dual-write (draft + snapshot)
|
|
91
279
|
* - metadata `lastVerifiedHash` updates via touch()
|
|
92
280
|
* - rich error wrapping
|
|
281
|
+
*
|
|
282
|
+
* Before any upload, one confirmation covers every file that would overwrite a platform version
|
|
283
|
+
* nobody here has seen ({@link confirmOverwrites}); declining stops the push with nothing written.
|
|
284
|
+
* A snapshot push then reads the live copies back ({@link verifyLiveSnapshot}). If any is still
|
|
285
|
+
* wrong, the push stops before cleanup and history and returns `liveVerified: false`.
|
|
286
|
+
* @param opts.overwrite Draft-relative paths whose overwrite the caller confirms up front, so the
|
|
287
|
+
* push doesn't ask about them (e.g. a consumer's flag, after the user approved the files a
|
|
288
|
+
* declined push listed). Other at-risk files still ask.
|
|
289
|
+
* @throws an {@link Err.OverwriteDeclinedError} when an overwrite is not confirmed
|
|
290
|
+
* @lastreviewed null
|
|
93
291
|
*/
|
|
94
292
|
async function executePush(opts) {
|
|
95
|
-
const { ctx, targetUrl, rootPath, snapshot, message } = opts;
|
|
293
|
+
const { ctx, targetUrl, rootPath, snapshot, message, overwrite } = opts;
|
|
96
294
|
const { fs, prompt, logger, sessionManager, progress } = ctx;
|
|
97
295
|
const draftPath = path.join(rootPath, constants_1.FolderNames.DRAFT);
|
|
98
296
|
const draftUri = B6PUri_1.B6PUri.fromFsPath(draftPath);
|
|
99
297
|
if (!(await fs.exists(draftUri))) {
|
|
100
298
|
prompt.error(`Draft folder not found: ${draftPath}`);
|
|
101
|
-
return {
|
|
299
|
+
return {
|
|
300
|
+
pushed: false,
|
|
301
|
+
historyRecorded: false,
|
|
302
|
+
typeCheckDiagnostics: null,
|
|
303
|
+
liveVerified: null,
|
|
304
|
+
liveMismatches: [],
|
|
305
|
+
keptPlatformOnly: [],
|
|
306
|
+
};
|
|
102
307
|
}
|
|
103
308
|
// Build a parser from the target URL so the ScriptRoot can resolve
|
|
104
309
|
// upstairs URLs (mirrors what executePull does on the pull side).
|
|
@@ -112,8 +317,30 @@ async function executePush(opts) {
|
|
|
112
317
|
// Snapshots transpile TS into the draft build folder so both the source
|
|
113
318
|
// and emitted JS get uploaded and captured in history. Must run before
|
|
114
319
|
// flattenDirectory so the emitted files are included in the upload set.
|
|
320
|
+
// A plain (non-snapshot) push does not compile, so its type-check status is
|
|
321
|
+
// null rather than a count.
|
|
322
|
+
let typeCheckDiagnostics = null;
|
|
323
|
+
let typeCheckDetail = "";
|
|
115
324
|
if (snapshot) {
|
|
116
|
-
await scriptRoot.compileDraftFolder();
|
|
325
|
+
const compileOutcome = await scriptRoot.compileDraftFolder();
|
|
326
|
+
typeCheckDiagnostics = compileOutcome.diagnosticCount;
|
|
327
|
+
typeCheckDetail = compileOutcome.diagnosticText;
|
|
328
|
+
const buildFolderPath = (await scriptRoot.getDraftBuildFolder()).uri().fsPath;
|
|
329
|
+
const entrypoint = await checkEmittedEntrypoint({ draftPath, buildFolderPath, fs });
|
|
330
|
+
if (entrypoint.status === "missing" || entrypoint.status === "empty") {
|
|
331
|
+
prompt.error(`Snapshot not published: the compiled entrypoint ${entrypoint.emittedPath} ` +
|
|
332
|
+
`${entrypoint.status === "missing" ? "is missing" : "has no code"} after compiling scripts/app.ts. ` +
|
|
333
|
+
`The platform runs that file, so publishing it would break the live version. Nothing was ` +
|
|
334
|
+
`uploaded. Check scripts/app.ts, the compile output and the draft ${TsConfig_1.TsConfig.NAME}.`);
|
|
335
|
+
return {
|
|
336
|
+
pushed: false,
|
|
337
|
+
historyRecorded: false,
|
|
338
|
+
typeCheckDiagnostics,
|
|
339
|
+
liveVerified: null,
|
|
340
|
+
liveMismatches: [],
|
|
341
|
+
keptPlatformOnly: [],
|
|
342
|
+
};
|
|
343
|
+
}
|
|
117
344
|
}
|
|
118
345
|
// Push does NOT transpile client bundles (e.g. a MergeReport `static/script.ts`
|
|
119
346
|
// → `static/.build/script.js`); the platform serves that emitted JS verbatim
|
|
@@ -130,14 +357,35 @@ async function executePush(opts) {
|
|
|
130
357
|
logger.info(`Found ${allFiles.length} files in draft folder`);
|
|
131
358
|
if (allFiles.length === 0) {
|
|
132
359
|
prompt.info("No files to push — draft folder is empty.");
|
|
133
|
-
return {
|
|
360
|
+
return {
|
|
361
|
+
pushed: false,
|
|
362
|
+
historyRecorded: false,
|
|
363
|
+
typeCheckDiagnostics,
|
|
364
|
+
liveVerified: null,
|
|
365
|
+
liveMismatches: [],
|
|
366
|
+
keptPlatformOnly: [],
|
|
367
|
+
};
|
|
134
368
|
}
|
|
135
|
-
|
|
369
|
+
// One ScriptFile per file for the whole push: the confirmation pass and the upload share them,
|
|
370
|
+
// and with them each file's cached skip check.
|
|
371
|
+
const entries = allFiles.map((filePath) => ({
|
|
372
|
+
filePath,
|
|
373
|
+
file: factory.createFile(B6PUri_1.B6PUri.fromFsPath(filePath), scriptRoot),
|
|
374
|
+
}));
|
|
375
|
+
const confirmed = await confirmOverwrites({
|
|
376
|
+
files: entries.map((e) => e.file),
|
|
377
|
+
ctx,
|
|
378
|
+
isSnapshot: snapshot,
|
|
379
|
+
preConfirmed: overwrite,
|
|
380
|
+
});
|
|
381
|
+
// Files upload() actually wrote (a resolved Response); skipped files resolve with undefined.
|
|
382
|
+
const written = [];
|
|
383
|
+
const uploadTasks = entries.map(({ filePath, file }) => ({
|
|
136
384
|
execute: async () => {
|
|
137
|
-
const fileUri = B6PUri_1.B6PUri.fromFsPath(filePath);
|
|
138
|
-
const file = factory.createFile(fileUri, scriptRoot);
|
|
139
385
|
try {
|
|
140
|
-
await file.upload({ isSnapshot: snapshot })
|
|
386
|
+
if (await file.upload({ isSnapshot: snapshot, overwriteConfirmed: confirmed.has(file) })) {
|
|
387
|
+
written.push(file);
|
|
388
|
+
}
|
|
141
389
|
}
|
|
142
390
|
catch (e) {
|
|
143
391
|
if (e instanceof Err_1.Err.UserCancelledError) {
|
|
@@ -155,10 +403,37 @@ async function executePush(opts) {
|
|
|
155
403
|
showItemCount: true,
|
|
156
404
|
cleanupMessage: "Cleaning up...",
|
|
157
405
|
});
|
|
406
|
+
// A snapshot push is only done when the runtime serves what was pushed. If a live copy is still
|
|
407
|
+
// wrong, stop: deleting platform files or recording a restore point would build on a broken publish.
|
|
408
|
+
let liveVerified = null;
|
|
409
|
+
if (snapshot) {
|
|
410
|
+
const live = await verifyLiveSnapshot(written, ctx);
|
|
411
|
+
if (live.indeterminate.length > 0) {
|
|
412
|
+
prompt.warn(`Could not verify the live copy of ${live.indeterminate.length} file(s): the platform served them ` +
|
|
413
|
+
`without a content hash (ETag).\n\n${live.indeterminate.join("\n")}`);
|
|
414
|
+
}
|
|
415
|
+
if (live.mismatches.length > 0) {
|
|
416
|
+
prompt.error(`The live (snapshot/) copy of ${live.mismatches.length} file(s) is missing, unreadable or does not ` +
|
|
417
|
+
`match what was pushed, ` +
|
|
418
|
+
`even after sending it again. The live version may be broken or out of date:\n\n` +
|
|
419
|
+
`${live.mismatches.join("\n")}\n\n` +
|
|
420
|
+
`No cleanup ran and no snapshot history was recorded. Run the snapshot push again.`);
|
|
421
|
+
return {
|
|
422
|
+
pushed: true,
|
|
423
|
+
historyRecorded: false,
|
|
424
|
+
typeCheckDiagnostics,
|
|
425
|
+
liveVerified: false,
|
|
426
|
+
liveMismatches: live.mismatches,
|
|
427
|
+
keptPlatformOnly: [],
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
// Nothing was wrong, but a copy served without a content hash was never compared.
|
|
431
|
+
liveVerified = live.indeterminate.length > 0 ? null : true;
|
|
432
|
+
}
|
|
158
433
|
// Cleanup: delete unused upstairs paths.
|
|
159
434
|
const gitignorePatterns = await readGitIgnorePatterns(rootPath, fs);
|
|
160
435
|
const gitignoreMatcher = new GlobMatcher_1.GlobMatcher(rootPath, gitignorePatterns);
|
|
161
|
-
await cleanupUnusedUpstairsPaths({
|
|
436
|
+
const keptPlatformOnly = await cleanupUnusedUpstairsPaths({
|
|
162
437
|
ctx,
|
|
163
438
|
targetUrl,
|
|
164
439
|
draftPath,
|
|
@@ -174,18 +449,42 @@ async function executePush(opts) {
|
|
|
174
449
|
logger.warn(`Failed to record snapshot history: ${e instanceof Error ? e.message : e}`);
|
|
175
450
|
}
|
|
176
451
|
}
|
|
452
|
+
// A snapshot that compiled with diagnostics shipped un-type-checked JS. Say so
|
|
453
|
+
// loudly and do NOT let the run read as a clean success — the platform never
|
|
454
|
+
// type-checks, so this push was the only gate (ClickUp 86bbeb659).
|
|
455
|
+
const shippedWithDiagnostics = snapshot && typeCheckDiagnostics !== null && typeCheckDiagnostics > 0;
|
|
456
|
+
if (shippedWithDiagnostics) {
|
|
457
|
+
prompt.warn(`Published WITHOUT a passing type-check: the pre-publish transpile reported ` +
|
|
458
|
+
`${typeCheckDiagnostics} diagnostic(s). The JavaScript was emitted and is now live, but these ` +
|
|
459
|
+
`were NOT verified — each is either a real type error or a missing platform declaration, and ` +
|
|
460
|
+
`the platform does not type-check on its side. Review them before relying on this build:\n\n` +
|
|
461
|
+
typeCheckDetail);
|
|
462
|
+
}
|
|
177
463
|
if (snapshot && !historyRecorded) {
|
|
178
464
|
prompt.warn("Snapshot files uploaded and compiled, but the snapshot history entry could NOT be recorded — " +
|
|
179
465
|
"the browser IDE's Project History has no restore point for this snapshot. " +
|
|
180
466
|
"Run the snapshot push again to retry recording it.");
|
|
181
467
|
}
|
|
468
|
+
else if (shippedWithDiagnostics) {
|
|
469
|
+
prompt.info("Snapshot uploaded — but see the type-check warning above.");
|
|
470
|
+
}
|
|
182
471
|
else {
|
|
183
472
|
prompt.info(snapshot ? "Snapshot complete!" : "Push complete!");
|
|
184
473
|
}
|
|
185
|
-
return { pushed: true, historyRecorded };
|
|
474
|
+
return { pushed: true, historyRecorded, typeCheckDiagnostics, liveVerified, liveMismatches: [], keptPlatformOnly };
|
|
186
475
|
}
|
|
187
476
|
/**
|
|
188
|
-
* Delete remote files that no longer have a local counterpart
|
|
477
|
+
* Delete remote files that no longer have a local counterpart, after one confirmation listing
|
|
478
|
+
* them. Anything but an explicit "Yes" keeps them all, including a prompt that throws because it
|
|
479
|
+
* got no answer. Files matched by `.gitignore` are never deleted. Failures are logged, never
|
|
480
|
+
* thrown: a push that uploaded fine is not failed by cleanup.
|
|
481
|
+
* @param opts.ctx Where requests, prompts and logs go
|
|
482
|
+
* @param opts.targetUrl The script's WebDAV base URL, listed with `PROPFIND`
|
|
483
|
+
* @param opts.draftPath The local draft folder to compare against
|
|
484
|
+
* @param opts.gitignoreMatcher The script's `.gitignore` patterns
|
|
485
|
+
* @returns Draft-relative paths of the platform-only files it kept because deleting them was not
|
|
486
|
+
* confirmed; empty when there were none, when they were deleted, or when cleanup failed
|
|
487
|
+
* @lastreviewed null
|
|
189
488
|
*/
|
|
190
489
|
async function cleanupUnusedUpstairsPaths(opts) {
|
|
191
490
|
const { ctx, targetUrl, draftPath, gitignoreMatcher } = opts;
|
|
@@ -201,17 +500,18 @@ async function cleanupUnusedUpstairsPaths(opts) {
|
|
|
201
500
|
});
|
|
202
501
|
if (!response.ok) {
|
|
203
502
|
logger.warn(`PROPFIND failed during cleanup: ${response.status}`);
|
|
204
|
-
return;
|
|
503
|
+
return [];
|
|
205
504
|
}
|
|
206
505
|
const xml = await response.text();
|
|
207
506
|
const parsed = parser.parse(xml);
|
|
208
507
|
const responses = parsed?.["D:multistatus"]?.["D:response"];
|
|
209
508
|
if (!responses?.filter) {
|
|
210
|
-
return;
|
|
509
|
+
return [];
|
|
211
510
|
}
|
|
212
511
|
const localFiles = await flattenDirectory(draftPath, fs);
|
|
213
512
|
const localRelatives = new Set(localFiles.map((f) => path.relative(draftPath, f).split(path.sep).join("/")));
|
|
214
513
|
const pathsToDelete = [];
|
|
514
|
+
const relativesToDelete = [];
|
|
215
515
|
for (const entry of responses) {
|
|
216
516
|
const href = entry["D:href"];
|
|
217
517
|
if (!href) {
|
|
@@ -241,26 +541,44 @@ async function cleanupUnusedUpstairsPaths(opts) {
|
|
|
241
541
|
}
|
|
242
542
|
if (!localRelatives.has(draftRelative)) {
|
|
243
543
|
pathsToDelete.push(entryUrl.href);
|
|
544
|
+
relativesToDelete.push(draftRelative);
|
|
244
545
|
}
|
|
245
546
|
}
|
|
246
547
|
if (pathsToDelete.length === 0) {
|
|
247
548
|
logger.info("No unused upstairs paths to delete.");
|
|
248
|
-
return;
|
|
549
|
+
return [];
|
|
249
550
|
}
|
|
250
|
-
|
|
551
|
+
// "No" is FIRST: an empty answer and the CLI's --yes both take options[0], and a yes deletes
|
|
552
|
+
// platform files that may exist nowhere else (ClickUp 86bc2h3ef).
|
|
251
553
|
const NO = "No";
|
|
252
|
-
const
|
|
554
|
+
const YES = "Yes";
|
|
555
|
+
let answer;
|
|
556
|
+
try {
|
|
557
|
+
answer = await prompt.confirm(`The following ${pathsToDelete.length} upstairs path(s) no longer have local counterparts:\n\n${pathsToDelete.join("\n")}\n\nDelete them?`, [NO, YES], { destructive: true, safeOption: NO });
|
|
558
|
+
}
|
|
559
|
+
catch (e) {
|
|
560
|
+
// No answer at all (end of input, a dismissed dialog) is not a yes. The files stay, so they
|
|
561
|
+
// must be reported as kept, not lost in the catch below as a failed cleanup.
|
|
562
|
+
logger.warn(`Cleanup prompt got no answer: ${e instanceof Error ? e.message : e}`);
|
|
563
|
+
}
|
|
253
564
|
if (answer !== YES) {
|
|
254
|
-
|
|
255
|
-
|
|
565
|
+
// A warning, not info: consumers that quiet info (e.g. for machine-readable output) still
|
|
566
|
+
// show warnings, and an auto-answered prompt was never shown to anyone. It says what was
|
|
567
|
+
// kept; how to confirm a delete is the consumer's to explain.
|
|
568
|
+
prompt.warn(`Kept ${pathsToDelete.length} platform-only file(s): they are on the platform but not in your local ` +
|
|
569
|
+
`draft folder, and deleting them was not confirmed.\n\n${pathsToDelete.join("\n")}\n\n` +
|
|
570
|
+
`Pull them to get them locally.`);
|
|
571
|
+
return relativesToDelete;
|
|
256
572
|
}
|
|
257
573
|
for (const url of pathsToDelete) {
|
|
258
574
|
logger.info("Deleting unused upstairs path: " + url);
|
|
259
575
|
await sessionManager.fetch(url, { method: constants_1.Http.Methods.DELETE });
|
|
260
576
|
}
|
|
577
|
+
return [];
|
|
261
578
|
}
|
|
262
579
|
catch (e) {
|
|
263
580
|
logger.warn(`Cleanup failed: ${e instanceof Error ? e.message : e}`);
|
|
581
|
+
return [];
|
|
264
582
|
}
|
|
265
583
|
}
|
|
266
584
|
//# sourceMappingURL=push.js.map
|
package/dist/script/push.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push.js","sourceRoot":"","sources":["../../src/script/push.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqFA,kCAgHC;AArMD,2CAA6B;AAC7B,qDAA4C;AAC5C,4CAA+D;AAC/D,sCAAmC;AACnC,qDAAkD;AAClD,6DAA0D;AAC1D,mDAAgD;AAChD,uEAAoE;AAGpE,gCAA6B;AAG7B;;GAEG;AACH,KAAK,UAAU,gBAAgB,CAAC,OAAe,EAAE,EAAc;IAC7D,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,aAAa,CAAC,eAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;IACnE,KAAK,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,OAAO,EAAE,CAAC;QACnC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACtC,IAAI,IAAI,KAAK,WAAW,EAAE,CAAC;YACzB,MAAM,MAAM,GAAG,MAAM,gBAAgB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAChD,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC;QAC1B,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrB,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;GAIG;AACH,KAAK,UAAU,qBAAqB,CAAC,QAAgB,EAAE,EAAc;IACnE,MAAM,aAAa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,MAAM,cAAc,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,gBAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;QACnE,CAAC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACrE,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bluestep-systems/b6p-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Core (vscode-free) library for BlueStep B6P script management",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"clean": "rm -rf dist",
|
|
27
27
|
"format": "prettier --write \"src/**/*.ts\"",
|
|
28
28
|
"format-check": "prettier --check \"src/**/*.ts\"",
|
|
29
|
-
"test": "npm run compile && node test/B6PUri.test.js && node test/DownstairsPathParser.test.js && node test/TsLibResolver.test.js && node test/AuditIntegrity.test.js && node test/GetSetupUrl.test.js && node test/TsConfigBuildFolder.test.js && node test/StaleClientBundles.test.js && node test/JsdocLastReviewed.test.js && node test/PullDivergenceGuard.test.js && node test/SnapshotHistoryRetry.test.js && node test/ScriptMetaDataStore.test.js && node test/SharedFilePersistence.test.js && node test/OrgCacheReadiness.test.js && node test/BearerAuthProvider.test.js",
|
|
29
|
+
"test": "npm run compile && node test/B6PUri.test.js && node test/DownstairsPathParser.test.js && node test/TsLibResolver.test.js && node test/AuditIntegrity.test.js && node test/GetSetupUrl.test.js && node test/TsConfigBuildFolder.test.js && node test/StaleClientBundles.test.js && node test/TranspileDeclarations.test.js && node test/JsdocLastReviewed.test.js && node test/PullDivergenceGuard.test.js && node test/SnapshotHistoryRetry.test.js && node test/ScriptMetaDataStore.test.js && node test/SharedFilePersistence.test.js && node test/OrgCacheReadiness.test.js && node test/BearerAuthProvider.test.js && node test/SnapshotPublishGuard.test.js && node test/DestructivePrompts.test.js",
|
|
30
30
|
"prepublishOnly": "npm run clean && npm run format-check && npm run check-types && npm run compile"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|