fullstacked 0.12.0-1205 → 0.12.0-1212

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.
File without changes
@@ -1,2 +1,3 @@
1
- import ".";
2
- declare module "ai" {}
1
+ import * as ai from ".";
2
+ export default ai;
3
+ export * from ".";
@@ -1,2 +1,3 @@
1
- import ".";
2
- declare module "archive" {}
1
+ import * as archive from "./archive";
2
+ export default archive;
3
+ export * from "./archive";
@@ -1,4 +1,3 @@
1
1
  import * as archive from "./archive";
2
-
3
2
  export default archive;
4
3
  export * from "./archive";
File without changes
@@ -15,6 +15,7 @@ import { Button } from "@fullstacked/ui";
15
15
  import { serializeArgs } from "./serialization";
16
16
  import { buildSASS } from "../esbuild/sass";
17
17
  import fs from "../fs";
18
+ import packages from "../packages";
18
19
 
19
20
  export type Bridge = (
20
21
  payload: Uint8Array,
@@ -61,11 +62,12 @@ bridge(new Uint8Array([0]));
61
62
 
62
63
  let lastUpdateCheck = 0;
63
64
  const updateCheckDelay = 1000 * 10; // 10sec;
65
+ let updating = false;
64
66
  async function checkForUpdates() {
65
67
  window.requestAnimationFrame(checkForUpdates);
66
68
 
67
69
  const now = Date.now();
68
- if (now - lastUpdateCheck < updateCheckDelay) {
70
+ if (now - lastUpdateCheck < updateCheckDelay || updating) {
69
71
  return;
70
72
  }
71
73
 
@@ -89,18 +91,25 @@ async function checkForUpdates() {
89
91
  button: preventReloadButton
90
92
  });
91
93
 
92
- buildSASS(fs).then(() => {
93
- esbuild.build().then(() => {
94
- snackbar.dismiss();
95
- if (preventReload) return;
96
- window.location.reload();
97
- });
94
+ updating = true;
95
+ update().then(() => {
96
+ updating = false;
97
+ snackbar.dismiss();
98
+
99
+ if (preventReload) return;
100
+ window.location.reload();
98
101
  });
99
102
  }
100
103
  if (await git.hasGit()) {
101
104
  checkForUpdates();
102
105
  }
103
106
 
107
+ async function update() {
108
+ await packages.installQuick();
109
+ await buildSASS(fs);
110
+ return esbuild.build();
111
+ }
112
+
104
113
  // 40
105
114
  function setTitle(title: string) {
106
115
  const payload = new Uint8Array([40, ...serializeArgs([title])]);
@@ -95,7 +95,7 @@ export function serializeArgs(args: any[]) {
95
95
  }
96
96
 
97
97
  export function deserializeArgs(data: Uint8Array) {
98
- const args = [];
98
+ const args: any[] = [];
99
99
 
100
100
  let cursor = 0;
101
101
  while (cursor < data.byteLength) {
File without changes
File without changes
@@ -1,2 +1,3 @@
1
- import ".";
2
- declare module "connect" {}
1
+ import * as connect from ".";
2
+ export default connect;
3
+ export * from ".";
File without changes
File without changes
@@ -11,7 +11,7 @@ export async function buildSASS(
11
11
  },
12
12
  project?: Project
13
13
  ): Promise<Partial<Message>> {
14
- const baseDirectory = project?.id || "";
14
+ const baseDirectory = project?.id || ".";
15
15
 
16
16
  const writeOutputCSS = async (css: string) => {
17
17
  const buildDirectory = baseDirectory
@@ -1,2 +1,3 @@
1
- import ".";
2
- declare module "fetch" {}
1
+ import * as fetch from ".";
2
+ export default fetch;
3
+ export * from ".";
@@ -46,6 +46,8 @@ function receivedResponse(base64Data: string) {
46
46
  const id = args.at(0);
47
47
  const fetchRequest = activeFetchRequests.get(id);
48
48
 
49
+ if (!fetchRequest) return;
50
+
49
51
  const [statusCode, statusMessage, headersStr, body] = args.slice(1);
50
52
 
51
53
  const response: ResponseSimplified = {
@@ -136,6 +138,8 @@ function receivedResponse2(base64Data: string) {
136
138
  const id = args.at(0);
137
139
  const request = activeFetch2Requests.get(id);
138
140
 
141
+ if (!request) return;
142
+
139
143
  if (request.resolveStream) {
140
144
  const [done, chunk] = args.slice(1);
141
145
  request.resolveStream({ done, chunk });
@@ -221,8 +225,8 @@ function receivedResponse2(base64Data: string) {
221
225
  },
222
226
 
223
227
  // not implemented
224
- clone: () => null,
225
- formData: async () => null
228
+ clone: () => null as unknown as Response,
229
+ formData: async () => null as unknown as FormData
226
230
  };
227
231
 
228
232
  request.resolveResponse(response);
@@ -1,2 +1,3 @@
1
- import ".";
2
- declare module "fs" {}
1
+ import * as fs from "./fs";
2
+ export default fs;
3
+ export * from "./fs";
@@ -0,0 +1,13 @@
1
+ import "./ai";
2
+ import "./archive";
3
+ import "./connect";
4
+ import "./fetch";
5
+ import "./fs";
6
+ import "./platform";
7
+ declare module "ai";
8
+ declare module "archive";
9
+ declare module "connect";
10
+ declare module "fetch";
11
+ declare module "fs";
12
+ //@ts-ignore
13
+ declare module "platform";
File without changes
File without changes
@@ -1,2 +1,3 @@
1
- import ".";
2
- declare module "platform" {}
1
+ import * as platform from ".";
2
+ export default platform;
3
+ export * from ".";
File without changes
package/index.js CHANGED
@@ -399,7 +399,7 @@ import { promises } from "node:fs";
399
399
  // ../../fullstacked_modules/esbuild/sass.ts
400
400
  import * as sass from "sass";
401
401
  async function buildSASS(fs3, project) {
402
- const baseDirectory = project?.id || "";
402
+ const baseDirectory = project?.id || ".";
403
403
  const writeOutputCSS = async (css) => {
404
404
  const buildDirectory = baseDirectory ? `${baseDirectory}/.build` : ".build";
405
405
  await fs3.mkdir(buildDirectory);
@@ -612,8 +612,11 @@ var defaultTsConfig = {
612
612
  moduleResolution: "Node10",
613
613
  allowJs: true,
614
614
  lib: ["dom", "dom.iterable", "es2023"],
615
- types: ["./node_modules/fullstacked/lib/fullstacked.d.ts"],
616
- jsx: "react"
615
+ jsx: "react",
616
+ paths: {
617
+ "*": ["./node_modules/fullstacked/fullstacked_modules/*"]
618
+ },
619
+ typeRoots: ["./node_modules/fullstacked/fullstacked_modules"]
617
620
  }
618
621
  };
619
622
  var defaultGitignore = `node_modules
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fullstacked",
3
- "version": "0.12.0-1205",
3
+ "version": "0.12.0-1212",
4
4
  "scripts": {
5
5
  "build": "node build.js",
6
6
  "start": "npm run build && node index.js --lib ../../core/bin --root ~/FullStacked --config ~/.config/fullstacked --editor ../../out/editor",
@@ -25,6 +25,11 @@
25
25
  "@types/ws": "^8.5.13",
26
26
  "node-addon-api": "^8.3.1"
27
27
  },
28
+ "overrides": {
29
+ "cli-progress": {
30
+ "string-width": "^8.1.0"
31
+ }
32
+ },
28
33
  "author": "FullStacked",
29
34
  "license": "MIT",
30
35
  "description": "Create, run and share projects built with web technologies in a fully cross-platform, local-first environment.",
@@ -1 +0,0 @@
1
- [{"type":"human","data":{"content":"what the content of story.txt?","additional_kwargs":{},"response_metadata":{}}},{"type":"ai","data":{"content":"<think>\nOkay, the user is asking for the content of a file called story.txt. Let me check the tools available. There's a ReadFile function that takes a path parameter. So I need to call that function with the path set to \"story.txt\". I should make sure the path is correct and the file exists. Since the user is asking specifically about story.txt, I don't need to do anything else except use the ReadFile function with that path. Let me structure the tool call properly.\n</think>\n\n","additional_kwargs":{},"response_metadata":{"model":"qwen3:8b","created_at":"2025-07-31T16:19:45.325202883Z","done_reason":"stop","done":true,"total_duration":25031934804,"load_duration":4390703002,"prompt_eval_count":206,"prompt_eval_duration":8109112003,"eval_count":125,"eval_duration":12528890465},"tool_call_chunks":[{"name":"ReadFile","args":"{\"path\":\"story.txt\"}","type":"tool_call_chunk","index":0,"id":"8c36106e-98af-4a16-9628-f3ec1d99bf59"}],"usage_metadata":{"input_tokens":206,"output_tokens":125,"total_tokens":331},"tool_calls":[{"name":"ReadFile","args":{"path":"story.txt"},"id":"8c36106e-98af-4a16-9628-f3ec1d99bf59","type":"tool_call"}],"invalid_tool_calls":[]}},{"type":"tool","data":{"content":"Once upon a time, in a land far away, there was a curious little fox named Felix. Felix had a peculiar habit of collecting shiny objects. One day, while exploring the forest, he stumbled upon a magical mirror that showed not his reflection, but his deepest desires.\n\nFelix looked into the mirror and saw himself as a mighty king, ruling over a grand kingdom. He wished for that life instantly. The mirror granted his wish, and suddenly, Felix was a king with a golden crown and a kingdom of his own.\n\nBut as days passed, Felix realized that being a king was lonely. He missed the simplicity of his forest life. One day, he decided to return to the mirror and wished to be himself again. The mirror, surprised by his honesty, granted his wish and returned him to the forest.\n\nFrom that day on, Felix learned that true happiness comes from being himself, not from what he desires. And so, he continued his adventures, collecting shiny objects, but always remembering the lesson he learned from the magical mirror.","tool_call_id":"8c36106e-98af-4a16-9628-f3ec1d99bf59","name":"ReadFile","additional_kwargs":{},"response_metadata":{"user-defined-message":"Reading story.txt"}}},{"type":"ai","data":{"content":"<think>\n</think>\n\nThe content of the file \"story.txt\" is as follows:\n\n---\n\nOnce upon a time, in a land far away, there was a curious little fox named Felix. Felix had a peculiar habit of collecting shiny objects. One day, while exploring the forest, he stumbled upon a magical mirror that showed not his reflection, but his deepest desires.\n\nFelix looked into the mirror and saw himself as a mighty king, ruling over a grand kingdom. He wished for that life instantly. The mirror granted his wish, and suddenly, Felix was a king with a golden crown and a kingdom of his own.\n\nBut as days passed, Felix realized that being a king was lonely. He missed the simplicity of his forest life. One day, he decided to return to the mirror and wished to be himself again. The mirror, surprised by his honesty, granted his wish and returned him to the forest.\n\nFrom that day on, Felix learned that true happiness comes from being himself, not from what he desires. And so, he continued his adventures, collecting shiny objects, but always remembering the lesson he learned from the magical mirror.\n\n---","additional_kwargs":{},"response_metadata":{"model":"qwen3:8b","created_at":"2025-07-31T16:20:13.836205883Z","done_reason":"stop","done":true,"total_duration":28495883305,"load_duration":39413458,"prompt_eval_count":532,"prompt_eval_duration":8563310838,"eval_count":229,"eval_duration":19874104717},"tool_call_chunks":[],"usage_metadata":{"input_tokens":532,"output_tokens":229,"total_tokens":761},"tool_calls":[],"invalid_tool_calls":[]}}]