@pulse-editor/cli 0.1.11 → 0.1.13

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.
@@ -143,11 +143,11 @@ export default function Login({ cli }) {
143
143
  }, {
144
144
  isActive: loginMethod === "flow" && flowState === "idle" && Boolean(authUrl),
145
145
  });
146
- return (_jsxs(_Fragment, { children: [isShowLoginMethod && (_jsxs(_Fragment, { children: [_jsx(Text, { children: "Login to the Pulse Editor Platform" }), _jsx(SelectInput, { items: loginMethodItems, onSelect: (item) => {
146
+ return (_jsxs(_Fragment, { children: [isShowLoginMethod && (_jsxs(_Fragment, { children: [_jsx(Text, { children: "Login to the Palmos Platform" }), _jsx(SelectInput, { items: loginMethodItems, onSelect: (item) => {
147
147
  setLoginMethod(item.value);
148
148
  }, isFocused: loginMethod === undefined }), _jsx(Text, { children: " " })] })), isMethodSelected &&
149
149
  loginMethod === "token" &&
150
- (token.length === 0 ? (_jsxs(_Fragment, { children: [_jsx(Text, { children: "Enter your Pulse Editor access token:" }), _jsx(TextInput, { mask: "*", value: tokenInput, onChange: setTokenInput, onSubmit: (value) => {
150
+ (token.length === 0 ? (_jsxs(_Fragment, { children: [_jsx(Text, { children: "Enter your Palmos access token:" }), _jsx(TextInput, { mask: "*", value: tokenInput, onChange: setTokenInput, onSubmit: (value) => {
151
151
  if (value.length === 0) {
152
152
  return;
153
153
  }
@@ -167,5 +167,5 @@ export default function Login({ cli }) {
167
167
  else {
168
168
  exit();
169
169
  }
170
- } })] })] })), isTokenSaved && (_jsxs(Text, { children: ["Token saved to ", path.join(os.homedir(), ".pulse-editor")] }))] })) : (_jsx(Text, { children: "Authentication error: please enter valid credentials." }))), isMethodSelected && loginMethod === "flow" && (_jsx(_Fragment, { children: flowState === "error" ? (_jsxs(Text, { color: "red", children: ["Error: ", flowError] })) : flowState === "success" ? (_jsx(Text, { children: "\u2705 Login successful! Saving credentials..." })) : flowState === "waiting" || flowState === "opening" ? (_jsxs(Box, { flexDirection: "column", gap: 1, children: [_jsxs(Box, { children: [_jsx(Spinner, { type: "dots" }), _jsx(Text, { children: " Waiting for browser authentication..." })] }), _jsx(Text, { dimColor: true, children: "If the browser did not open, visit: " }), authUrl && _jsx(TerminalLink, { url: authUrl })] })) : authUrl ? (_jsxs(Box, { flexDirection: "column", gap: 1, children: [_jsxs(Text, { children: ["Press ", _jsx(Text, { bold: true, children: "Enter" }), " to open your browser and login:"] }), _jsx(TerminalLink, { url: authUrl, label: "Open browser to login \u2192" })] })) : (_jsxs(Box, { children: [_jsx(Spinner, { type: "dots" }), _jsx(Text, { children: " Preparing login..." })] })) }))] }));
170
+ } })] })] })), isTokenSaved && (_jsxs(Text, { children: ["Token saved to ", path.join(os.homedir(), ".palmos")] }))] })) : (_jsx(Text, { children: "Authentication error: please enter valid credentials." }))), isMethodSelected && loginMethod === "flow" && (_jsx(_Fragment, { children: flowState === "error" ? (_jsxs(Text, { color: "red", children: ["Error: ", flowError] })) : flowState === "success" ? (_jsx(Text, { children: "\u2705 Login successful! Saving credentials..." })) : flowState === "waiting" || flowState === "opening" ? (_jsxs(Box, { flexDirection: "column", gap: 1, children: [_jsxs(Box, { children: [_jsx(Spinner, { type: "dots" }), _jsx(Text, { children: " Waiting for browser authentication..." })] }), _jsx(Text, { dimColor: true, children: "If the browser did not open, visit: " }), authUrl && _jsx(TerminalLink, { url: authUrl })] })) : authUrl ? (_jsxs(Box, { flexDirection: "column", gap: 1, children: [_jsxs(Text, { children: ["Press ", _jsx(Text, { bold: true, children: "Enter" }), " to open your browser and login:"] }), _jsx(TerminalLink, { url: authUrl, label: "Open browser to login \u2192" })] })) : (_jsxs(Box, { children: [_jsx(Spinner, { type: "dots" }), _jsx(Text, { children: " Preparing login..." })] })) }))] }));
171
171
  }
@@ -108,5 +108,5 @@ export default function Publish({ cli }) {
108
108
  buildExtension();
109
109
  }
110
110
  }, [isAuthenticated]);
111
- return (_jsx(_Fragment, { children: !isInProjectDir ? (_jsx(Text, { color: 'redBright', children: "\u26D4 The current directory does not contain a Pulse Editor project." })) : isCheckingAuth ? (_jsxs(Box, { children: [_jsx(Spinner, { type: "dots" }), _jsx(Text, { children: " Checking authentication..." })] })) : !isAuthenticated ? (_jsxs(Text, { children: ["You are not authenticated or your access token is invalid. Publishing to Extension Marketplace is in Beta access. Please visit", _jsx(Text, { color: 'blueBright', children: " https://pulse-editor.com/beta " }), "to apply for Beta access."] })) : (_jsxs(_Fragment, { children: [isBuilding && (_jsxs(Box, { children: [_jsx(Spinner, { type: "dots" }), _jsx(Text, { children: " Building..." })] })), isBuildingError && (_jsx(Text, { color: 'redBright', children: "\u274C Error building the extension. Please run `npm run build` to see the error." })), isZipping && (_jsxs(Box, { children: [_jsx(Spinner, { type: "dots" }), _jsx(Text, { children: " Compressing build..." })] })), isZippingError && (_jsxs(Text, { color: 'redBright', children: ["\u274C Error zipping the build output. ", failureMessage] })), isPublishing && (_jsxs(Box, { children: [_jsx(Spinner, { type: "dots" }), _jsx(Text, { children: " Publishing..." })] })), isPublishingError && (_jsxs(_Fragment, { children: [_jsx(Text, { color: 'redBright', children: "\u274C Failed to publish extension." }), failureMessage && (_jsxs(Text, { color: 'redBright', children: ["Error: ", failureMessage] }))] })), isPublished && (_jsx(Text, { color: 'greenBright', children: "\u2705 Extension published successfully." }))] })) }));
111
+ return (_jsx(_Fragment, { children: !isInProjectDir ? (_jsx(Text, { color: 'redBright', children: "\u26D4 The current directory does not contain a Pulse Editor project." })) : isCheckingAuth ? (_jsxs(Box, { children: [_jsx(Spinner, { type: "dots" }), _jsx(Text, { children: " Checking authentication..." })] })) : !isAuthenticated ? (_jsxs(Text, { children: ["You are not authenticated or your access token is invalid. Publishing to Extension Marketplace is in Beta access. Please visit", _jsx(Text, { color: 'blueBright', children: " https://palmos.ai/beta " }), "to apply for Beta access."] })) : (_jsxs(_Fragment, { children: [isBuilding && (_jsxs(Box, { children: [_jsx(Spinner, { type: "dots" }), _jsx(Text, { children: " Building..." })] })), isBuildingError && (_jsx(Text, { color: 'redBright', children: "\u274C Error building the extension. Please run `npm run build` to see the error." })), isZipping && (_jsxs(Box, { children: [_jsx(Spinner, { type: "dots" }), _jsx(Text, { children: " Compressing build..." })] })), isZippingError && (_jsxs(Text, { color: 'redBright', children: ["\u274C Error zipping the build output. ", failureMessage] })), isPublishing && (_jsxs(Box, { children: [_jsx(Spinner, { type: "dots" }), _jsx(Text, { children: " Publishing..." })] })), isPublishingError && (_jsxs(_Fragment, { children: [_jsx(Text, { color: 'redBright', children: "\u274C Failed to publish extension." }), failureMessage && (_jsxs(Text, { color: 'redBright', children: ["Error: ", failureMessage] }))] })), isPublished && (_jsx(Text, { color: 'greenBright', children: "\u2705 Extension published successfully." }))] })) }));
112
112
  }
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, Text } from 'ink';
3
3
  export default function Header() {
4
- return (_jsxs(Box, { flexDirection: "column", alignItems: "center", children: [_jsx(Text, { color: 'whiteBright', children: "Palmos CLI" }), _jsx(Text, { children: "Version: 0.0.1" }), _jsx(Text, { color: 'blueBright', children: "https://pulse-editor.com" })] }));
4
+ return (_jsxs(Box, { flexDirection: "column", alignItems: "center", children: [_jsx(Text, { color: 'whiteBright', children: "Palmos CLI" }), _jsx(Text, { children: "Version: 0.0.1" }), _jsx(Text, { color: 'blueBright', children: "https://palmos.ai" })] }));
5
5
  }
@@ -5,6 +5,6 @@ describe("getBackendUrl", () => {
5
5
  expect(getBackendUrl(true)).toBe("https://localhost:8080");
6
6
  });
7
7
  it("should return production URL when stage is false", () => {
8
- expect(getBackendUrl(false)).toBe("https://pulse-editor.com");
8
+ expect(getBackendUrl(false)).toBe("https://palmos.ai");
9
9
  });
10
10
  });
@@ -14,7 +14,7 @@ vi.mock("os", () => ({
14
14
  },
15
15
  }));
16
16
  vi.mock("../backend-url.js", () => ({
17
- getBackendUrl: vi.fn((stage) => stage ? "https://localhost:8080" : "https://pulse-editor.com"),
17
+ getBackendUrl: vi.fn((stage) => stage ? "https://localhost:8080" : "https://palmos.ai"),
18
18
  }));
19
19
  import fs from "fs";
20
20
  describe("saveToken", () => {
@@ -114,7 +114,7 @@ describe("checkToken", () => {
114
114
  globalThis.fetch = vi.fn().mockResolvedValue({ status: 200 });
115
115
  const result = await checkToken("valid-token", false);
116
116
  expect(result).toBe(true);
117
- expect(fetch).toHaveBeenCalledWith("https://pulse-editor.com/api/api-keys/check", expect.objectContaining({
117
+ expect(fetch).toHaveBeenCalledWith("https://palmos.ai/api/api-keys/check", expect.objectContaining({
118
118
  method: "POST",
119
119
  body: JSON.stringify({ token: "valid-token" }),
120
120
  }));
@@ -9,7 +9,7 @@ vi.mock("../../token.js", () => ({
9
9
  getToken: vi.fn(() => "test-token"),
10
10
  }));
11
11
  vi.mock("../../backend-url.js", () => ({
12
- getBackendUrl: vi.fn((stage) => stage ? "https://localhost:8080" : "https://pulse-editor.com"),
12
+ getBackendUrl: vi.fn((stage) => stage ? "https://localhost:8080" : "https://palmos.ai"),
13
13
  }));
14
14
  import fs from "fs";
15
15
  describe("publishApp", () => {
@@ -22,7 +22,7 @@ describe("publishApp", () => {
22
22
  .mockReturnValueOnce('{"visibility": "public"}')
23
23
  .mockReturnValueOnce(Buffer.from("fake-zip"));
24
24
  const res = await publishApp(false);
25
- expect(fetch).toHaveBeenCalledWith("https://pulse-editor.com/api/app/publish", expect.objectContaining({
25
+ expect(fetch).toHaveBeenCalledWith("https://palmos.ai/api/app/publish", expect.objectContaining({
26
26
  method: "POST",
27
27
  headers: expect.objectContaining({
28
28
  Authorization: "Bearer test-token",
@@ -1 +1 @@
1
- export declare function getBackendUrl(stage: boolean): "https://localhost:8080" | "https://pulse-editor.com";
1
+ export declare function getBackendUrl(stage: boolean): "https://localhost:8080" | "https://palmos.ai";
@@ -1,3 +1,3 @@
1
1
  export function getBackendUrl(stage) {
2
- return stage ? 'https://localhost:8080' : 'https://pulse-editor.com';
2
+ return stage ? 'https://localhost:8080' : 'https://palmos.ai';
3
3
  }
@@ -33,14 +33,14 @@ const skillActions = pulseConfig?.actions || [];
33
33
  const skillActionNames = skillActions.map((a) => a.name);
34
34
  const app = express();
35
35
  app.use(cors());
36
- // Inject the client-side livereload script into HTML responses
36
+ // Inject the client-side livereload script into HTML responses in workspace
37
37
  app.use(
38
38
  // The port might not be right here for the ingress.
39
39
  // I need this route to be exposed
40
40
  connectLivereload({
41
41
  // @ts-expect-error override server options
42
42
  host: workspaceId
43
- ? `${workspaceId}.workspace.pulse-editor.com"`
43
+ ? `${workspaceId}.workspace.palmos.ai"`
44
44
  : undefined,
45
45
  port: workspaceId ? 443 : 35729,
46
46
  }));
@@ -1,4 +1,4 @@
1
- import { existsSync, writeFileSync } from "fs";
1
+ import { existsSync, mkdirSync, writeFileSync } from "fs";
2
2
  import fs from "fs/promises";
3
3
  import { globSync } from "glob";
4
4
  import { networkInterfaces } from "os";
@@ -374,10 +374,15 @@ export function compileAppActionSkills(pulseConfig) {
374
374
  }
375
375
  // Generate tsconfig for server functions
376
376
  export function generateTempTsConfig() {
377
- const tempTsConfigPath = path.join(process.cwd(), "node_modules/.pulse/tsconfig.server.json");
378
- if (existsSync(tempTsConfigPath)) {
379
- return;
380
- }
377
+ const tempTsConfigDir = path.join(process.cwd(), "node_modules/.pulse");
378
+ const tempTsConfigPath = path.join(tempTsConfigDir, "tsconfig.server.json");
379
+ // Always regenerate: the previous implementation skipped regeneration when
380
+ // the file existed, but the tsconfig bakes in absolute paths derived from
381
+ // process.cwd(). If the project is moved/renamed (or was generated from a
382
+ // different parent dir) the stale cache causes ts-loader TS18003 errors.
383
+ // Ensure the parent directory exists so we don't ENOENT on fresh installs
384
+ // or when `.pulse` has been wiped.
385
+ mkdirSync(tempTsConfigDir, { recursive: true });
381
386
  const tsConfig = {
382
387
  compilerOptions: {
383
388
  target: "ES2020",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pulse-editor/cli",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "license": "MIT",
5
5
  "bin": {
6
6
  "pulse": "dist/cli.js"