statelyai 0.7.9 → 0.7.10
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 +3 -0
- package/dist/bin.mjs +1 -1
- package/dist/{cli-RMsm3QLT.mjs → cli-Duxz6wQc.mjs} +16 -10
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -367,6 +367,9 @@ Set `NO_COLOR=1` or `CI=true` for plain output.
|
|
|
367
367
|
|
|
368
368
|
- **The server returns `401`:** run `statelyai login`, or set
|
|
369
369
|
`STATELY_ACCESS_TOKEN` or `STATELY_API_KEY`.
|
|
370
|
+
- **A remote command says `Not logged in`:** run `statelyai login`, then retry,
|
|
371
|
+
or use `statelyai init --local` for a local-only project. Add `--force` to
|
|
372
|
+
replace an existing config.
|
|
370
373
|
- **`push` finds no files:** check `include` and `exclude`; `init` without
|
|
371
374
|
`--scan` intentionally leaves `include` empty.
|
|
372
375
|
- **You only need local inventory:** run `statelyai scan` or initialize with
|
package/dist/bin.mjs
CHANGED
|
@@ -2629,16 +2629,22 @@ var InitCommand = class InitCommand extends Command {
|
|
|
2629
2629
|
const { flags } = await this.parse(InitCommand);
|
|
2630
2630
|
const resolvedApiKey = flags.local ? { source: "missing" } : await resolveApiKey();
|
|
2631
2631
|
this.log(flags.local ? "Creating local project config..." : "Creating or reusing remote project...");
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2632
|
+
let result;
|
|
2633
|
+
try {
|
|
2634
|
+
result = await initProject({
|
|
2635
|
+
apiKey: resolvedApiKey.apiKey,
|
|
2636
|
+
baseUrl: flags["base-url"],
|
|
2637
|
+
force: flags.force,
|
|
2638
|
+
local: flags.local,
|
|
2639
|
+
project: {
|
|
2640
|
+
...flags.name ? { name: flags.name } : {},
|
|
2641
|
+
visibility: flags.visibility
|
|
2642
|
+
}
|
|
2643
|
+
});
|
|
2644
|
+
} catch (error) {
|
|
2645
|
+
if (resolvedApiKey.source === "missing" && error instanceof StudioApiError && (error.status === 401 || error.status === 403)) this.error("Not logged in. Run `npx statelyai login` and retry. To initialize without an account, run `npx statelyai init --local` (add `--force` to replace an existing config).");
|
|
2646
|
+
throw error;
|
|
2647
|
+
}
|
|
2642
2648
|
const initMessage = result.project ? (() => {
|
|
2643
2649
|
const projectEditorUrl = buildProjectEditorUrl(result.config.studioUrl, result.project.projectId);
|
|
2644
2650
|
return result.reusedExistingConfig ? `Using existing statelyai.json at ${result.configPath} for project ${result.project.projectId}.\nEditor: ${projectEditorUrl}` : `Initialized project ${result.project.projectId} and wrote ${result.configPath}.\nEditor: ${projectEditorUrl}`;
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as scanProjectMachines, S as run, T as createStatelyProjectConfig, _ as isFileGitDirty, a as discoverMachinesInSource, b as resolveCredentialStatus, c as formatDiscoveredMachines, d as formatProjectStatus, f as formatStoredCredentialSource, g as initProject, h as inferInitProjectName, i as discoverLinkedPullTargets, l as formatMissingNewMachineDirMessage, m as getEnvCredential, n as buildOAuthLoginStart, o as discoverOAuthLogin, p as getEnvApiKey, r as classifyPushCandidates, s as discoverRemoteProjectMachineTargets, t as COMMANDS, u as formatPlanSummary, v as resolveApiKey, w as scanProjectSources, x as resolveProjectStatus, y as resolveConfiguredPullTargets } from "./cli-
|
|
1
|
+
import { C as scanProjectMachines, S as run, T as createStatelyProjectConfig, _ as isFileGitDirty, a as discoverMachinesInSource, b as resolveCredentialStatus, c as formatDiscoveredMachines, d as formatProjectStatus, f as formatStoredCredentialSource, g as initProject, h as inferInitProjectName, i as discoverLinkedPullTargets, l as formatMissingNewMachineDirMessage, m as getEnvCredential, n as buildOAuthLoginStart, o as discoverOAuthLogin, p as getEnvApiKey, r as classifyPushCandidates, s as discoverRemoteProjectMachineTargets, t as COMMANDS, u as formatPlanSummary, v as resolveApiKey, w as scanProjectSources, x as resolveProjectStatus, y as resolveConfiguredPullTargets } from "./cli-Duxz6wQc.mjs";
|
|
2
2
|
|
|
3
3
|
export { COMMANDS, buildOAuthLoginStart, classifyPushCandidates, createStatelyProjectConfig, discoverLinkedPullTargets, discoverMachinesInSource, discoverOAuthLogin, discoverRemoteProjectMachineTargets, formatDiscoveredMachines, formatMissingNewMachineDirMessage, formatPlanSummary, formatProjectStatus, formatStoredCredentialSource, getEnvApiKey, getEnvCredential, inferInitProjectName, initProject, isFileGitDirty, resolveApiKey, resolveConfiguredPullTargets, resolveCredentialStatus, resolveProjectStatus, run, scanProjectMachines, scanProjectSources };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "statelyai",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.10",
|
|
4
4
|
"description": "Command-line tools for Stately",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@oclif/core": "^4.10.3",
|
|
24
|
-
"@statelyai/sdk": "0.
|
|
24
|
+
"@statelyai/sdk": "0.14.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"tsdown": "0.21.0-beta.2",
|