Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.9.0 #111

Merged
merged 65 commits into from
Oct 26, 2024
Merged

0.9.0 #111

Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
7bc13b9
New UI setup and looking clean
cplepage Oct 10, 2024
efc764b
review
cplepage Oct 10, 2024
c01e002
Merge pull request #101 from fullstackedorg/100-setup-new-ui-primitives
cplepage Oct 10, 2024
4672235
projects view and some organizing
cplepage Oct 11, 2024
c74fcab
fixed bouncy logo splash
cplepage Oct 11, 2024
5da7c09
safer delete project
cplepage Oct 11, 2024
08e5493
create views and scrollable view
cplepage Oct 11, 2024
e77f279
settings
cplepage Oct 13, 2024
1142bf1
settings looks nice
cplepage Oct 14, 2024
13f184e
advancements
cplepage Oct 15, 2024
117b0ce
some tuning
cplepage Oct 15, 2024
a6514d0
file tree
cplepage Oct 15, 2024
8056408
code editor with ts
cplepage Oct 15, 2024
c79da3e
import zip
cplepage Oct 15, 2024
ee14525
import zip cb
cplepage Oct 15, 2024
ee1f91f
rename method in Android and iOS adapters
cplepage Oct 16, 2024
2197aa7
ImageView fix
cplepage Oct 16, 2024
18ce0bf
create, rename, delete items
cplepage Oct 16, 2024
9d3f492
git dialog
cplepage Oct 17, 2024
285cb65
files
cplepage Oct 17, 2024
aff1f09
git changes
cplepage Oct 17, 2024
4f43eb9
fixed rename on win
Oct 17, 2024
ceddb76
fmt
cplepage Oct 17, 2024
7236e11
test commit
cplepage Oct 17, 2024
3770873
git dialog
cplepage Oct 18, 2024
a4b85be
git status arrow
cplepage Oct 18, 2024
61b311d
fmt
cplepage Oct 18, 2024
2a31b42
package installer
cplepage Oct 21, 2024
e4ec600
files
cplepage Oct 21, 2024
9b62dc6
even faster deps discovery
cplepage Oct 21, 2024
acd1416
reviews
cplepage Oct 21, 2024
1e19640
concurrent install 1
cplepage Oct 21, 2024
c34ff7e
pull new switched branch is on remote
cplepage Oct 21, 2024
e341734
create new branch
cplepage Oct 21, 2024
845e349
started peers view
cplepage Oct 22, 2024
4d18216
fmt
cplepage Oct 22, 2024
95f1406
peers
cplepage Oct 23, 2024
e5bee93
git auths
cplepage Oct 24, 2024
87377d5
almost there
cplepage Oct 24, 2024
189b0ae
completed settings
cplepage Oct 25, 2024
412f484
better re-rendering
cplepage Oct 25, 2024
ed9441b
esbuild installer
cplepage Oct 25, 2024
76eec07
rename
cplepage Oct 25, 2024
60e94e1
files
cplepage Oct 25, 2024
ee3fbe2
Merge pull request #104 from fullstackedorg/102-main-views
cplepage Oct 25, 2024
90cdd68
deleted old icons
cplepage Oct 25, 2024
f6e10f0
typecheck
cplepage Oct 25, 2024
9b387f4
fmt
cplepage Oct 25, 2024
31d9c11
useless import
cplepage Oct 25, 2024
1e7aa7b
merge main
cplepage Oct 25, 2024
c488735
deeplink and import demo
cplepage Oct 25, 2024
f04becb
file
cplepage Oct 25, 2024
2da97ad
fmt
cplepage Oct 25, 2024
c68440e
Merge pull request #106 from fullstackedorg/42-progress-for-deep-link…
cplepage Oct 25, 2024
e401cf8
pass
cplepage Oct 25, 2024
89db177
Merge pull request #109 from fullstackedorg/105-rewrite-tests
cplepage Oct 25, 2024
cabfa21
test wokring on windows
Oct 25, 2024
54aaa3b
windows darker scroll bar
Oct 25, 2024
254774c
prettier on ctrl/cmd + s
Oct 25, 2024
aa1cbea
view is functional
cplepage Oct 26, 2024
e7529a0
looking good
cplepage Oct 26, 2024
0f04919
looking good
cplepage Oct 26, 2024
08da6a0
test passes
cplepage Oct 26, 2024
f3a435b
clean
cplepage Oct 26, 2024
f252f79
Merge pull request #110 from fullstackedorg/new-root-dir
cplepage Oct 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@ build
dist
node_modules
out
platform/ios
editor-sample-demo

**/*.cache
platform/**/editor
editor-sample-demo

platform/android/studio/.gradle
platform/android/studio/.idea
platform/android/studio/app/.cxx
platform/android/studio/app/build
platform/android/studio/app/release

platform/docker/package

platform/electron/js

platform/ios/FullStacked.xcarchive
platform/ios/pkg
platform/ios/xcode/FullStacked.xcodeproj/xcshareddate
platform/ios/xcode/FullStacked.xcodeproj/xcuserdata
39 changes: 8 additions & 31 deletions build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,6 @@ esbuild.buildSync({
if (fs.existsSync("editor/build"))
fs.rmSync("editor/build", { recursive: true });

// old-styles
const scssFiles = (await scan("editor", fs.promises.readdir as any)).filter(
(filePath) => filePath.endsWith(".scss")
);

const compileScss = async (scssFile: string) => {
const { css } = await sass.compileAsync(scssFile);
if (css.length) fs.writeFileSync(scssFile.slice(0, -4) + "css", css);
};
const compilePromises = scssFiles.map(compileScss);
await Promise.all(compilePromises);
// end old-styles

const toBuild = [
["editor/index.ts", "index"],
["editor/typescript/worker.ts", "worker-ts"]
Expand All @@ -78,35 +65,20 @@ for (const [input, output] of toBuild) {
if (errors) buildErrors.push(errors);
}

// cleanup
scssFiles.forEach((scssFile) => {
const cssFile = scssFile.slice(0, -4) + "css";
if (fs.existsSync(cssFile)) fs.rmSync(cssFile);
});

if (buildErrors.length) throw buildErrors;

fs.cpSync("editor/index.html", "editor/build/index.html");
fs.cpSync("editor/assets", "editor/build/assets", {
recursive: true
});

// new-ui
const styleEntrypoint = "editor/new-ui.scss";
const styleEntrypoint = "editor/index.scss";
const { css } = await sass.compileAsync(styleEntrypoint);
await fs.promises.writeFile("editor/build/new-ui.css", css);
await fs.promises.writeFile("editor/build/index.css", css);

esbuild.buildSync({
entryPoints: ["editor/new-ui.ts"],
outfile: "editor/build/new-ui.js",
bundle: true
});

await fs.promises.copyFile("editor/new-ui.html", "editor/build/new-ui.html");
fs.cpSync("editor/icons", "editor/build/icons", {
recursive: true
});
// end new-ui

const sampleDemoDir = "editor-sample-demo";
if (fs.existsSync(sampleDemoDir)) {
Expand Down Expand Up @@ -138,11 +110,16 @@ const branch = child_process
.toString()
.trim();
const commit = child_process.execSync("git rev-parse HEAD").toString().trim();
const commitNumber = child_process
.execSync("git rev-list --count --all")
.toString()
.trim();
fs.writeFileSync(
"editor/build/version.json",
JSON.stringify({
version,
branch,
commit
commit,
commitNumber
})
);
2 changes: 1 addition & 1 deletion editor-sample-demo
52 changes: 40 additions & 12 deletions editor/api/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,17 @@ type DATA_TYPE = {
[CONFIG_TYPE.CONNECTIVITY]: Connectivity;
};

const configCacheDelay = 2000;
const configCache: Partial<{
[K in keyof DATA_TYPE]: {
promise: Promise<DATA_TYPE[K]>;
timeout?: ReturnType<typeof setTimeout>;
};
}> = {};

export default {
async init() {
const configDir = await rpc().directories.configDirectory();

if (await rpc().fs.exists(configDir, { absolutePath: true })) return;

await rpc().fs.mkdir(configDir, { absolutePath: true });
Expand All @@ -30,25 +37,46 @@ export default {
);
await git.init(project);
},
async load<T extends CONFIG_TYPE>(type: T): Promise<DATA_TYPE[T] | null> {
const configDir = await rpc().directories.configDirectory();
const configFile = configDir + "/" + type + ".json";
if (
(await rpc().fs.exists(configFile, { absolutePath: true }))?.isFile
) {
return JSON.parse(
(await rpc().fs.readFile(configFile, {
load<T extends keyof DATA_TYPE>(type: T): Promise<DATA_TYPE[T]> {
if (!configCache[type]) {
const promise = new Promise<DATA_TYPE[T]>(async (resolve) => {
const configDir = await rpc().directories.configDirectory();
const configFile = configDir + "/" + type + ".json";

const configFileExists = (
await rpc().fs.exists(configFile, { absolutePath: true })
)?.isFile;
if (!configFileExists) {
return resolve(null);
}

const contents = (await rpc().fs.readFile(configFile, {
encoding: "utf8",
absolutePath: true
})) as string
);
})) as string;

resolve(JSON.parse(contents));

const timeout = setTimeout(() => {
delete configCache[type];
}, configCacheDelay);

if (configCache[type]) {
configCache[type].timeout = timeout;
}
});

configCache[type] = {
promise
} as (typeof configCache)[T];
}

return null;
return configCache[type].promise;
},
async save<T extends CONFIG_TYPE>(type: T, data: DATA_TYPE[T]) {
const configDir = await rpc().directories.configDirectory();
const configFile = configDir + "/" + type + ".json";
delete configCache[type];
rpc().fs.writeFile(configFile, JSON.stringify(data, null, 2), {
absolutePath: true
});
Expand Down
2 changes: 1 addition & 1 deletion editor/api/config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ export type Connectivity = {
me: Peer;
autoConnect: boolean;
defaultNetworkInterface: string;
webAddreses: WebAddress[];
webAddresses: WebAddress[];
peersTrusted: PeerTrusted[];
};
Loading