cursedops 0.2.6 → 0.2.7
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/package.json +1 -1
- package/src/publicSurface.ts +9 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cursedops",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"description": "The build-and-ops answers this generation's apps wrote independently and identically: finding a generation's roots without knowing a path, macOS launchd agent install/replace/remove, the scaffolding of a deployed smoke, and the static-serving helpers eight apps copied — the path-traversal guard among them — and the API floor that keeps an unmatched /api/... from ever being answered with the app shell — and the public-surface ratchet three published libraries each carried a forked copy of. Mechanism only — no app knows its name from here. Bun, zero runtime dependencies (typescript is an optional peer, for public-surface only), ships source.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
package/src/publicSurface.ts
CHANGED
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
*
|
|
62
62
|
* ## Why one body, and why here
|
|
63
63
|
*
|
|
64
|
-
* Until 0.2.6 this was `scripts/publicSurface.ts` in each of the three libraries, and
|
|
64
|
+
* Until 0.2.6 (0.2.7 is the first that type-checks under every consumer) this was `scripts/publicSurface.ts` in each of the three libraries, and
|
|
65
65
|
* the third was written knowing it was a third (task 084). The bodies had already
|
|
66
66
|
* forked — which is the whole argument:
|
|
67
67
|
*
|
|
@@ -155,7 +155,6 @@
|
|
|
155
155
|
*/
|
|
156
156
|
import { dirname, join } from "node:path";
|
|
157
157
|
import ts from "typescript";
|
|
158
|
-
import { findPackageRoot } from "./roots.ts";
|
|
159
158
|
|
|
160
159
|
export type SurfaceOptions = {
|
|
161
160
|
/** The package directory — the one holding `package.json` and the baseline. */
|
|
@@ -559,7 +558,14 @@ export const main = async (argv: readonly string[], options: SurfaceOptions): Pr
|
|
|
559
558
|
if (import.meta.main) {
|
|
560
559
|
// The package is the one the command was run in — `bun run <script>` starts in the
|
|
561
560
|
// package root, and a walk up makes a subdirectory work too.
|
|
562
|
-
|
|
561
|
+
// 🔴 Walked here rather than imported from `./roots.ts`: consumers type-check this
|
|
562
|
+
// file as source under THEIR tsconfig, and 0.2.6's `./roots.ts` import failed
|
|
563
|
+
// `cursedbelt`'s (TS5097, no `allowImportingTsExtensions`). No sibling import, no
|
|
564
|
+
// extension question.
|
|
565
|
+
let root: string | null = process.cwd();
|
|
566
|
+
while (root !== null && !(await Bun.file(join(root, "package.json")).exists())) {
|
|
567
|
+
root = dirname(root) === root ? null : dirname(root);
|
|
568
|
+
}
|
|
563
569
|
if (root === null) {
|
|
564
570
|
console.error(`public-surface: no package.json at or above ${process.cwd()}.`);
|
|
565
571
|
process.exit(1);
|