@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/B6PUri.d.ts CHANGED
@@ -1,18 +1,65 @@
1
1
  /**
2
2
  * Cross-platform URI abstraction that replaces `vscode.Uri` in the core layer.
3
3
  *
4
- * Internally stores a canonical `file://` URL string (for filesystem paths) or
5
- * an arbitrary URL string (for WebDAV / HTTP targets). Uses Node's `url` module
6
- * for the platform-specific heavy lifting — `pathToFileURL` and `fileURLToPath`
7
- * handle Windows drive-letter normalization, backslash conversion, etc.
4
+ * Internally stores a **canonical** URL string — a `file://` URL for filesystem
5
+ * paths, or any other URL for WebDAV / HTTP targets. Uses Node's `url` module for
6
+ * the platform-specific heavy lifting — `pathToFileURL` and `fileURLToPath` handle
7
+ * Windows drive-letter normalization, backslash conversion, etc.
8
+ *
9
+ * Canonicality is an **invariant of both constructors**, and it is what makes
10
+ * {@link B6PUri.equals} equality-of-denotation rather than equality-of-spelling,
11
+ * and what makes {@link B6PUri.toString} sound to use as a `Map` key (as
12
+ * `MockFileSystem` does). Any future constructor must preserve it.
13
+ *
14
+ * A trailing separator on the path is a **meaningful folder marker**, not noise:
15
+ * `ScriptFactory.createNode` classifies a URI as a `ScriptFolder` rather than a
16
+ * `ScriptFile` on that signal alone. `file:///a/b` and `file:///a/b/` therefore
17
+ * denote different things and are correctly unequal. See
18
+ * {@link B6PUri.isDirectoryMarked} and {@link B6PUri.asDirectory}.
19
+ * @lastreviewed null
8
20
  */
9
21
  export declare class B6PUri {
10
22
  private readonly _href;
11
23
  private constructor();
12
24
  /** Create from a platform-native filesystem path (e.g. `C:\Users\foo` or `/home/foo`). */
13
25
  static fromFsPath(fsPath: string): B6PUri;
14
- /** Create from any URL string (`file://`, `https://`, etc.). */
15
- static fromUrl(url: string): B6PUri;
26
+ /**
27
+ * Create from any URL string (`file://`, `https://`, etc.).
28
+ *
29
+ * The string is **parsed and canonicalized**, not stored verbatim: `new URL(...)`
30
+ * normalizes percent-encoding and the empty `file://` authority, so
31
+ * `fromString("file:///a b")`, `fromString("file://localhost/a%20b")` and
32
+ * `fromFsPath("/a b")` all produce the same `_href` and compare `equals`. Storing
33
+ * the raw string instead let those diverge and silently keyed apart in any `Map`
34
+ * over {@link B6PUri.toString}.
35
+ *
36
+ * Parsing also makes a malformed URI fail **here**, at the mistake, rather than at
37
+ * the first {@link B6PUri.fsPath} / {@link B6PUri.scheme} access an arbitrary
38
+ * distance away. Note that `new URL` accepts more than it looks: a Windows path
39
+ * like `C:\Users\foo` parses as scheme `c:` rather than throwing, so use
40
+ * {@link B6PUri.fromFsPath} for filesystem paths.
41
+ *
42
+ * @param url An absolute URL string.
43
+ * @returns A canonical `B6PUri`.
44
+ * @throws {TypeError} `ERR_INVALID_URL` if `url` is not a parseable absolute URL.
45
+ * @lastreviewed null
46
+ */
47
+ static fromString(url: string): B6PUri;
48
+ /**
49
+ * A fresh `URL` view of {@link B6PUri._href}.
50
+ *
51
+ * Every accessor that needs to reach into the URL's structure goes through here
52
+ * rather than repeating `new URL(this._href)`. Deliberately a **method, not a
53
+ * cached getter**: the returned object is mutable and three callers assign to its
54
+ * `pathname`, so each needs its own instance. The method call site also keeps the
55
+ * parse visible — this is not free, and `href` is already stored canonical, so a
56
+ * caller that only needs the string should use {@link B6PUri.toString}.
57
+ *
58
+ * Never throws for an instance of this class: both constructors have already
59
+ * parsed the string, so canonicality guarantees this re-parse succeeds.
60
+ * @lastreviewed null
61
+ */
62
+ private toUrl;
16
63
  /** Platform-correct filesystem path. Only valid for `file://` URIs. */
17
64
  get fsPath(): string;
18
65
  /** The full URL string. */
@@ -23,9 +70,102 @@ export declare class B6PUri {
23
70
  get isFile(): boolean;
24
71
  /** Join path segments onto this URI, using posix rules on the URL pathname. */
25
72
  joinPath(...segments: string[]): B6PUri;
73
+ /**
74
+ * Whether this URI carries the trailing-separator **folder marker**.
75
+ *
76
+ * The marker is load-bearing: `ScriptFactory.createNode` uses it as the *only*
77
+ * folder signal, since it cannot touch the filesystem to check. This getter tests
78
+ * the URL pathname, which is equivalent to `createNode`'s
79
+ * `fsPath.endsWith(path.sep)` for `file://` URIs but also works for the WebDAV /
80
+ * HTTP URIs whose {@link B6PUri.fsPath} would throw.
81
+ * @lastreviewed null
82
+ */
83
+ get isDirectoryMarked(): boolean;
84
+ /**
85
+ * This URI with the trailing-separator folder marker applied — idempotent, and
86
+ * returns `this` when the marker is already present.
87
+ *
88
+ * Replaces the hand-rolled `joinPath("/")` / `path.join(p, "/")` idiom that used
89
+ * to re-establish the marker after {@link B6PUri.joinPath} or `path.join` drops it
90
+ * (`ScriptRoot`, `ScriptFolder.flattenDirectory`, `push.ts` — all migrated to this
91
+ * method). Query and fragment are preserved, unlike appending to the href.
92
+ *
93
+ * Has no effect on a URL with an opaque (non-hierarchical) path such as
94
+ * `mailto:`, whose pathname is not assignable; every scheme this class is used
95
+ * with (`file`, `http(s)`, WebDAV) is hierarchical.
96
+ * @lastreviewed null
97
+ */
98
+ asDirectory(): B6PUri;
99
+ /**
100
+ * Matches a hierarchical URL scheme (`file://`, `https://`, WebDAV …).
101
+ *
102
+ * The `//` is required, and that is what keeps a Windows path out: `new URL("C:/a")`
103
+ * parses happily as scheme `c:` with an opaque path, so testing for a bare `scheme:`
104
+ * would misread every drive-letter path as a URL.
105
+ * @lastreviewed null
106
+ */
107
+ private static readonly HIERARCHICAL_URL;
108
+ /**
109
+ * `s` with trailing separators removed, stopping short of anything that is a root.
110
+ *
111
+ * Both `/` and `\` are treated as separators regardless of the host platform — this
112
+ * must not consult `path.sep`. The comparison helpers built on it are exercised
113
+ * against Windows-shaped input from POSIX hosts (see `DownstairsPathParser.test.js`,
114
+ * which drives the Windows branch via `path.win32`), so a strip that only recognises
115
+ * the host's own separator answers differently depending on where it runs.
116
+ *
117
+ * Roots keep exactly one separator: `/` stays `/`, and `C:\` stays `C:\` rather than
118
+ * collapsing to the drive-relative `C:`, which denotes something else entirely.
119
+ * @lastreviewed null
120
+ */
121
+ private static stripTrailingSeparators;
122
+ /**
123
+ * `p` with any trailing folder marker removed, so a marked and an unmarked spelling
124
+ * of one directory compare equal.
125
+ *
126
+ * The single definition behind every marker-insensitive comparison in the codebase:
127
+ * `ScriptFolder.contains`/`equals`, `ScriptRoot.selectStaleBundles`'s containment
128
+ * test, and `MockFileSystem`'s entry keys. It lives here, beside
129
+ * {@link B6PUri.isDirectoryMarked} and {@link B6PUri.asDirectory}, because a
130
+ * comparison rule that disagrees with the API producing the marker is how the
131
+ * stale-bundle regression happened.
132
+ *
133
+ * Accepts either a filesystem path or a URL string, and handles each on its own
134
+ * terms:
135
+ *
136
+ * - **URL** — the marker is stripped from the *pathname*, so query and fragment
137
+ * survive. {@link B6PUri.asDirectory} deliberately preserves them, so
138
+ * `https://h/a?x=1` and its marked form `https://h/a/?x=1` are one directory and
139
+ * must key alike; a plain trailing-character trim would leave the marked spelling
140
+ * untouched (its last character is `1`) and silently split them.
141
+ * - **Path** — trailing `/` and `\` are trimmed directly.
142
+ *
143
+ * In both cases a root is preserved rather than trimmed away: `/`, `C:\`,
144
+ * `https://h/`, and `file:///C:/` (the Windows drive root, distinct from the
145
+ * drive-relative `file:///C:`) all come back unchanged.
146
+ * @lastreviewed null
147
+ */
148
+ static stripDirectoryMarker(p: string): string;
26
149
  /** The final path component (file or folder name). */
27
150
  get basename(): string;
28
- /** A new URI pointing to the parent directory. */
151
+ /**
152
+ * A new URI pointing to the parent directory, **unmarked**.
153
+ *
154
+ * The result is a directory in every case by construction, so marking it looks
155
+ * right — and an earlier revision did exactly that, via {@link B6PUri.asDirectory}.
156
+ * It caused a real regression: `TsConfig.folder()` is built from `rawUri.dirname`,
157
+ * so `ScriptRoot.findStaleClientBundles` began pushing a marker-terminated
158
+ * `sourceRoot`, and `selectStaleBundles`'s containment test compared against
159
+ * `"…/static" + sep + sep`. Nothing ever matched, and `b6p push` silently stopped
160
+ * warning about stale compiled client bundles.
161
+ *
162
+ * The misclassification the marker was meant to prevent — `ScriptFactory.createNode`
163
+ * treating a parent directory as a `ScriptFile` — is not reachable from any call
164
+ * site: every consumer of this getter either calls `createFolder` explicitly
165
+ * (`ScriptNode.parent`, `TsConfig.folder`) or takes `.fsPath` directly. A caller
166
+ * that genuinely needs the marked spelling asks for it with `.asDirectory()`.
167
+ * @lastreviewed null
168
+ */
29
169
  get dirname(): B6PUri;
30
170
  equals(other: B6PUri): boolean;
31
171
  }
package/dist/B6PUri.js CHANGED
@@ -39,10 +39,22 @@ const url_1 = require("url");
39
39
  /**
40
40
  * Cross-platform URI abstraction that replaces `vscode.Uri` in the core layer.
41
41
  *
42
- * Internally stores a canonical `file://` URL string (for filesystem paths) or
43
- * an arbitrary URL string (for WebDAV / HTTP targets). Uses Node's `url` module
44
- * for the platform-specific heavy lifting — `pathToFileURL` and `fileURLToPath`
45
- * handle Windows drive-letter normalization, backslash conversion, etc.
42
+ * Internally stores a **canonical** URL string — a `file://` URL for filesystem
43
+ * paths, or any other URL for WebDAV / HTTP targets. Uses Node's `url` module for
44
+ * the platform-specific heavy lifting — `pathToFileURL` and `fileURLToPath` handle
45
+ * Windows drive-letter normalization, backslash conversion, etc.
46
+ *
47
+ * Canonicality is an **invariant of both constructors**, and it is what makes
48
+ * {@link B6PUri.equals} equality-of-denotation rather than equality-of-spelling,
49
+ * and what makes {@link B6PUri.toString} sound to use as a `Map` key (as
50
+ * `MockFileSystem` does). Any future constructor must preserve it.
51
+ *
52
+ * A trailing separator on the path is a **meaningful folder marker**, not noise:
53
+ * `ScriptFactory.createNode` classifies a URI as a `ScriptFolder` rather than a
54
+ * `ScriptFile` on that signal alone. `file:///a/b` and `file:///a/b/` therefore
55
+ * denote different things and are correctly unequal. See
56
+ * {@link B6PUri.isDirectoryMarked} and {@link B6PUri.asDirectory}.
57
+ * @lastreviewed null
46
58
  */
47
59
  class B6PUri {
48
60
  _href;
@@ -54,9 +66,47 @@ class B6PUri {
54
66
  static fromFsPath(fsPath) {
55
67
  return new B6PUri((0, url_1.pathToFileURL)(fsPath).href);
56
68
  }
57
- /** Create from any URL string (`file://`, `https://`, etc.). */
58
- static fromUrl(url) {
59
- return new B6PUri(url);
69
+ /**
70
+ * Create from any URL string (`file://`, `https://`, etc.).
71
+ *
72
+ * The string is **parsed and canonicalized**, not stored verbatim: `new URL(...)`
73
+ * normalizes percent-encoding and the empty `file://` authority, so
74
+ * `fromString("file:///a b")`, `fromString("file://localhost/a%20b")` and
75
+ * `fromFsPath("/a b")` all produce the same `_href` and compare `equals`. Storing
76
+ * the raw string instead let those diverge and silently keyed apart in any `Map`
77
+ * over {@link B6PUri.toString}.
78
+ *
79
+ * Parsing also makes a malformed URI fail **here**, at the mistake, rather than at
80
+ * the first {@link B6PUri.fsPath} / {@link B6PUri.scheme} access an arbitrary
81
+ * distance away. Note that `new URL` accepts more than it looks: a Windows path
82
+ * like `C:\Users\foo` parses as scheme `c:` rather than throwing, so use
83
+ * {@link B6PUri.fromFsPath} for filesystem paths.
84
+ *
85
+ * @param url An absolute URL string.
86
+ * @returns A canonical `B6PUri`.
87
+ * @throws {TypeError} `ERR_INVALID_URL` if `url` is not a parseable absolute URL.
88
+ * @lastreviewed null
89
+ */
90
+ static fromString(url) {
91
+ return new B6PUri(new URL(url).href);
92
+ }
93
+ // ── Internals ─────────────────────────────────────────────────────
94
+ /**
95
+ * A fresh `URL` view of {@link B6PUri._href}.
96
+ *
97
+ * Every accessor that needs to reach into the URL's structure goes through here
98
+ * rather than repeating `new URL(this._href)`. Deliberately a **method, not a
99
+ * cached getter**: the returned object is mutable and three callers assign to its
100
+ * `pathname`, so each needs its own instance. The method call site also keeps the
101
+ * parse visible — this is not free, and `href` is already stored canonical, so a
102
+ * caller that only needs the string should use {@link B6PUri.toString}.
103
+ *
104
+ * Never throws for an instance of this class: both constructors have already
105
+ * parsed the string, so canonicality guarantees this re-parse succeeds.
106
+ * @lastreviewed null
107
+ */
108
+ toUrl() {
109
+ return new URL(this._href);
60
110
  }
61
111
  // ── Accessors ─────────────────────────────────────────────────────
62
112
  /** Platform-correct filesystem path. Only valid for `file://` URIs. */
@@ -69,7 +119,7 @@ class B6PUri {
69
119
  }
70
120
  /** The scheme portion (`file`, `https`, etc.). */
71
121
  get scheme() {
72
- return new URL(this._href).protocol.replace(/:$/, "");
122
+ return this.toUrl().protocol.replace(/:$/, "");
73
123
  }
74
124
  /** Whether this is a `file://` URI. */
75
125
  get isFile() {
@@ -81,23 +131,151 @@ class B6PUri {
81
131
  if (this.isFile) {
82
132
  return B6PUri.fromFsPath(path.join(this.fsPath, ...segments));
83
133
  }
84
- const url = new URL(this._href);
134
+ const url = this.toUrl();
85
135
  url.pathname = path.posix.join(url.pathname, ...segments);
86
136
  return new B6PUri(url.href);
87
137
  }
138
+ /**
139
+ * Whether this URI carries the trailing-separator **folder marker**.
140
+ *
141
+ * The marker is load-bearing: `ScriptFactory.createNode` uses it as the *only*
142
+ * folder signal, since it cannot touch the filesystem to check. This getter tests
143
+ * the URL pathname, which is equivalent to `createNode`'s
144
+ * `fsPath.endsWith(path.sep)` for `file://` URIs but also works for the WebDAV /
145
+ * HTTP URIs whose {@link B6PUri.fsPath} would throw.
146
+ * @lastreviewed null
147
+ */
148
+ get isDirectoryMarked() {
149
+ return this.toUrl().pathname.endsWith("/");
150
+ }
151
+ /**
152
+ * This URI with the trailing-separator folder marker applied — idempotent, and
153
+ * returns `this` when the marker is already present.
154
+ *
155
+ * Replaces the hand-rolled `joinPath("/")` / `path.join(p, "/")` idiom that used
156
+ * to re-establish the marker after {@link B6PUri.joinPath} or `path.join` drops it
157
+ * (`ScriptRoot`, `ScriptFolder.flattenDirectory`, `push.ts` — all migrated to this
158
+ * method). Query and fragment are preserved, unlike appending to the href.
159
+ *
160
+ * Has no effect on a URL with an opaque (non-hierarchical) path such as
161
+ * `mailto:`, whose pathname is not assignable; every scheme this class is used
162
+ * with (`file`, `http(s)`, WebDAV) is hierarchical.
163
+ * @lastreviewed null
164
+ */
165
+ asDirectory() {
166
+ if (this.isDirectoryMarked) {
167
+ return this;
168
+ }
169
+ const url = this.toUrl();
170
+ url.pathname += "/";
171
+ return new B6PUri(url.href);
172
+ }
173
+ /**
174
+ * Matches a hierarchical URL scheme (`file://`, `https://`, WebDAV …).
175
+ *
176
+ * The `//` is required, and that is what keeps a Windows path out: `new URL("C:/a")`
177
+ * parses happily as scheme `c:` with an opaque path, so testing for a bare `scheme:`
178
+ * would misread every drive-letter path as a URL.
179
+ * @lastreviewed null
180
+ */
181
+ static HIERARCHICAL_URL = /^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//;
182
+ /**
183
+ * `s` with trailing separators removed, stopping short of anything that is a root.
184
+ *
185
+ * Both `/` and `\` are treated as separators regardless of the host platform — this
186
+ * must not consult `path.sep`. The comparison helpers built on it are exercised
187
+ * against Windows-shaped input from POSIX hosts (see `DownstairsPathParser.test.js`,
188
+ * which drives the Windows branch via `path.win32`), so a strip that only recognises
189
+ * the host's own separator answers differently depending on where it runs.
190
+ *
191
+ * Roots keep exactly one separator: `/` stays `/`, and `C:\` stays `C:\` rather than
192
+ * collapsing to the drive-relative `C:`, which denotes something else entirely.
193
+ * @lastreviewed null
194
+ */
195
+ static stripTrailingSeparators(s) {
196
+ let end = s.length;
197
+ while (end > 0 && (s[end - 1] === "/" || s[end - 1] === "\\")) {
198
+ end--;
199
+ }
200
+ if (end === 0) {
201
+ // All separators — this is a root; keep one.
202
+ return s.slice(0, 1);
203
+ }
204
+ if (s[end - 1] === ":") {
205
+ // A drive root (`C:\`, `C:/`). Keep the separator that made it one.
206
+ return s.slice(0, end + 1);
207
+ }
208
+ return s.slice(0, end);
209
+ }
210
+ /**
211
+ * `p` with any trailing folder marker removed, so a marked and an unmarked spelling
212
+ * of one directory compare equal.
213
+ *
214
+ * The single definition behind every marker-insensitive comparison in the codebase:
215
+ * `ScriptFolder.contains`/`equals`, `ScriptRoot.selectStaleBundles`'s containment
216
+ * test, and `MockFileSystem`'s entry keys. It lives here, beside
217
+ * {@link B6PUri.isDirectoryMarked} and {@link B6PUri.asDirectory}, because a
218
+ * comparison rule that disagrees with the API producing the marker is how the
219
+ * stale-bundle regression happened.
220
+ *
221
+ * Accepts either a filesystem path or a URL string, and handles each on its own
222
+ * terms:
223
+ *
224
+ * - **URL** — the marker is stripped from the *pathname*, so query and fragment
225
+ * survive. {@link B6PUri.asDirectory} deliberately preserves them, so
226
+ * `https://h/a?x=1` and its marked form `https://h/a/?x=1` are one directory and
227
+ * must key alike; a plain trailing-character trim would leave the marked spelling
228
+ * untouched (its last character is `1`) and silently split them.
229
+ * - **Path** — trailing `/` and `\` are trimmed directly.
230
+ *
231
+ * In both cases a root is preserved rather than trimmed away: `/`, `C:\`,
232
+ * `https://h/`, and `file:///C:/` (the Windows drive root, distinct from the
233
+ * drive-relative `file:///C:`) all come back unchanged.
234
+ * @lastreviewed null
235
+ */
236
+ static stripDirectoryMarker(p) {
237
+ if (B6PUri.HIERARCHICAL_URL.test(p)) {
238
+ try {
239
+ const url = new URL(p);
240
+ url.pathname = B6PUri.stripTrailingSeparators(url.pathname);
241
+ return url.href;
242
+ }
243
+ catch {
244
+ // Not parseable after all; fall through and treat it as a path.
245
+ }
246
+ }
247
+ return B6PUri.stripTrailingSeparators(p);
248
+ }
88
249
  /** The final path component (file or folder name). */
89
250
  get basename() {
90
251
  if (this.isFile) {
91
252
  return path.basename(this.fsPath);
92
253
  }
93
- return path.posix.basename(new URL(this._href).pathname);
254
+ return path.posix.basename(this.toUrl().pathname);
94
255
  }
95
- /** A new URI pointing to the parent directory. */
256
+ /**
257
+ * A new URI pointing to the parent directory, **unmarked**.
258
+ *
259
+ * The result is a directory in every case by construction, so marking it looks
260
+ * right — and an earlier revision did exactly that, via {@link B6PUri.asDirectory}.
261
+ * It caused a real regression: `TsConfig.folder()` is built from `rawUri.dirname`,
262
+ * so `ScriptRoot.findStaleClientBundles` began pushing a marker-terminated
263
+ * `sourceRoot`, and `selectStaleBundles`'s containment test compared against
264
+ * `"…/static" + sep + sep`. Nothing ever matched, and `b6p push` silently stopped
265
+ * warning about stale compiled client bundles.
266
+ *
267
+ * The misclassification the marker was meant to prevent — `ScriptFactory.createNode`
268
+ * treating a parent directory as a `ScriptFile` — is not reachable from any call
269
+ * site: every consumer of this getter either calls `createFolder` explicitly
270
+ * (`ScriptNode.parent`, `TsConfig.folder`) or takes `.fsPath` directly. A caller
271
+ * that genuinely needs the marked spelling asks for it with `.asDirectory()`.
272
+ * @lastreviewed null
273
+ */
96
274
  get dirname() {
97
275
  if (this.isFile) {
98
276
  return B6PUri.fromFsPath(path.dirname(this.fsPath));
99
277
  }
100
- const url = new URL(this._href);
278
+ const url = this.toUrl();
101
279
  url.pathname = path.posix.dirname(url.pathname);
102
280
  return new B6PUri(url.href);
103
281
  }
@@ -1 +1 @@
1
- {"version":3,"file":"B6PUri.js","sourceRoot":"","sources":["../src/B6PUri.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,6BAAmD;AAEnD;;;;;;;GAOG;AACH,MAAa,MAAM;IACoB;IAArC,YAAqC,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;IAAG,CAAC;IAEtD,qEAAqE;IAErE,0FAA0F;IAC1F,MAAM,CAAC,UAAU,CAAC,MAAc;QAC9B,OAAO,IAAI,MAAM,CAAC,IAAA,mBAAa,EAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IAED,gEAAgE;IAChE,MAAM,CAAC,OAAO,CAAC,GAAW;QACxB,OAAO,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;IAED,qEAAqE;IAErE,uEAAuE;IACvE,IAAI,MAAM;QACR,OAAO,IAAA,mBAAa,EAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAED,2BAA2B;IAC3B,QAAQ;QACN,O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O,CAAC,CAAC;YACf,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;QAC1C,CAAC;KACF;IALY,IAAA,yBAAyB,4BAKrC,CAAA;IAED;;OAEG;IACH,MAAa,cAAe,SAAQ,KAAK;QACvC,YAAY,OAAe;YACzB,KAAK,CAAC,OAAO,CAAC,CAAC;YACf,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;QAC/B,CAAC;KACF;IALY,IAAA,cAAc,iBAK1B,CAAA;IAED,MAAa,aAAc,SAAQ,KAAK;QACtC,YAAY,OAAe;YACzB,KAAK,CAAC,OAAO,CAAC,CAAC;YACf,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC9B,CAAC;KACF;IALY,IAAA,aAAa,gBAKzB,CAAA;IAED,MAAa,oBAAqB,SAAQ,KAAK;QAC7C,YAAY,OAAe;YACzB,KAAK,CAAC,OAAO,CAAC,CAAC;YACf,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;QACrC,CAAC;KACF;IALY,IAAA,oBAAoB,uBAKhC,CAAA;AACH,CAAC,EAjyBgB,GAAG,aAAH,GAAG,GAAH,GAAG,QAiyBnB"}
@@ -0,0 +1,33 @@
1
+ import type { FileSystem, Logger, Progress, Prompt } from "./providers";
2
+ import type { SessionManager } from "./session/SessionManager";
3
+ /**
4
+ * The services every subsystem of the SDK needs, regardless of what it does.
5
+ *
6
+ * This is the shared half of a subsystem's dependency bundle. A subsystem extends
7
+ * it with what only that subsystem reads — {@link ScriptContext} adds the script
8
+ * metadata store, the org cache and the TypeScript lib directories — and
9
+ * {@link B6PCore} builds the shared half **once** and spreads it into each.
10
+ *
11
+ * The split exists so the shared members have a single construction site. With one
12
+ * flat per-subsystem interface, a second service needing `fs` + `sessionManager` +
13
+ * `logger` + `prompt` + `progress` would restate all five, `B6PCore`'s constructor
14
+ * would grow a second literal repeating them, and adding a provider would mean
15
+ * editing every one. Here it is one edit.
16
+ *
17
+ * `sessionManager` sits alongside the raw providers deliberately: it is
18
+ * core-constructed rather than consumer-supplied, but every subsystem that talks
19
+ * to the platform talks through it, which is the only membership test that matters.
20
+ *
21
+ * Note this is a bundle that is **held, never implemented**. Nothing should satisfy
22
+ * it by being a larger object that happens to contain these members — that is how a
23
+ * dependency bundle decays back into a service locator. See {@link ScriptContext}.
24
+ * @lastreviewed null
25
+ */
26
+ export interface PlatformContext {
27
+ readonly fs: FileSystem;
28
+ readonly sessionManager: SessionManager;
29
+ readonly logger: Logger;
30
+ readonly prompt: Prompt;
31
+ readonly progress: Progress;
32
+ isDebugMode(): boolean;
33
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=PlatformContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlatformContext.js","sourceRoot":"","sources":["../src/PlatformContext.ts"],"names":[],"mappings":""}
@@ -0,0 +1,64 @@
1
+ import type { BearerAuthParams } from "../types";
2
+ import type { AuthProvider, Logger, Persistence, Prompt } from "../providers";
3
+ /**
4
+ * Core-layer bearer auth provider.
5
+ *
6
+ * Holds a single opaque token, prompted from the user and kept in secret
7
+ * storage. Credential prompting and storage are delegated to the provider
8
+ * interfaces, so this class stays platform-free.
9
+ */
10
+ export declare class BearerAuthProvider implements AuthProvider<BearerAuthParams> {
11
+ private readonly persistence;
12
+ private readonly prompt;
13
+ private readonly logger;
14
+ constructor(persistence: Persistence, prompt: Prompt, logger: Logger);
15
+ /**
16
+ * Returns the bearer auth header value (`"Bearer <token>"`).
17
+ * Prompts for a token if none is stored.
18
+ */
19
+ authHeaderValue(): Promise<string>;
20
+ getOrCreate(): Promise<BearerAuthParams>;
21
+ /**
22
+ * The stored credentials, or `undefined` if absent or unusable.
23
+ *
24
+ * Secret storage is shared with every other key the consumer keeps, and its
25
+ * contents outlive any single version of this class, so what comes back is
26
+ * parsed and checked rather than asserted. Anything that is not well-formed
27
+ * `"bearer"` params is treated as absent, which routes the caller to a fresh
28
+ * prompt instead of letting a malformed value reach the `Authorization`
29
+ * header as `"Bearer undefined"`.
30
+ */
31
+ private readStored;
32
+ private isBearerAuthParams;
33
+ /**
34
+ * Prompt for a new token and store it.
35
+ *
36
+ * An **empty** entry is treated as cancellation, not as a token. It has to be:
37
+ * {@link isBearerAuthParams} rejects a zero-length token, so storing one produced a
38
+ * credential this class would immediately discard — `hasCredentials()` returned
39
+ * false right after a "Token stored" log line, and the next `authHeaderValue()`
40
+ * re-prompted, giving a user who keeps pressing Enter an unbounded prompt loop.
41
+ *
42
+ * Note {@link update} deliberately reads empty as "keep the current token"; there
43
+ * is no current token to keep here.
44
+ * @lastreviewed null
45
+ */
46
+ createNew(): Promise<BearerAuthParams>;
47
+ /**
48
+ * Update the stored token (prompts, keeps the old value on empty input).
49
+ */
50
+ update(): Promise<BearerAuthParams>;
51
+ /**
52
+ * Clear the stored token, along with any credentials left behind by the
53
+ * removed basic-auth provider.
54
+ */
55
+ clear(): Promise<void>;
56
+ /**
57
+ * Whether a usable token is currently stored.
58
+ *
59
+ * Agrees with {@link getOrCreate}: a stored value that would be discarded as
60
+ * malformed reports `false`, so this never claims credentials that the next
61
+ * `getOrCreate()` would throw away and re-prompt for.
62
+ */
63
+ hasCredentials(): Promise<boolean>;
64
+ }