poe-code 3.0.321 → 3.0.322

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "poe-code",
3
- "version": "3.0.321",
3
+ "version": "3.0.322",
4
4
  "description": "CLI tool to configure Poe API for developer workflows.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -6,6 +6,7 @@ export interface ProviderConfigStoreOptions {
6
6
  }
7
7
  export interface LoadProviderShapeBaseUrlsOptions extends ProviderConfigStoreOptions {
8
8
  providerId: string;
9
+ readOnly?: boolean;
9
10
  }
10
11
  export interface SaveProviderShapeBaseUrlsOptions extends ProviderConfigStoreOptions {
11
12
  providerId: string;
@@ -1,6 +1,7 @@
1
- import { readDocument, writeScope } from "./store.js";
1
+ import { readDocument, readDocumentReadonly, writeScope } from "./store.js";
2
2
  export async function loadProviderShapeBaseUrls(options) {
3
- const document = await readDocument(options.fs, options.filePath);
3
+ const readConfig = options.readOnly ? readDocumentReadonly : readDocument;
4
+ const document = await readConfig(options.fs, options.filePath);
4
5
  const providers = getOwnRecordEntry(document, providersScope);
5
6
  const providerConfig = getOwnRecordEntry(providers, options.providerId);
6
7
  if (Object.keys(providerConfig).length === 0) {