Skip to content

Commit 282ccdc

Browse files
committed
deploy: 8a905e4
1 parent a73c553 commit 282ccdc

28 files changed

+667
-299
lines changed

appConfig.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ window.AppConfig = {
2323
"extension_store_url": "https://store.core.ai/src/",
2424
"app_notification_url": "assets/notifications/dev/",
2525
"linting.enabled_by_default": true,
26-
"build_timestamp": "2024-01-19T05:19:31.563Z",
26+
"build_timestamp": "2024-01-19T11:44:31.643Z",
2727
"googleAnalyticsID": "G-P4HJFPDB76",
2828
"googleAnalyticsIDDesktop": "G-VE5BXWJ0HF",
2929
"mixPanelID": "49c4d164b592be2350fc7af06a259bf3",
@@ -34,7 +34,7 @@ window.AppConfig = {
3434
"bugsnagEnv": "development"
3535
},
3636
"name": "Phoenix",
37-
"version": "3.2.20-19740",
37+
"version": "3.2.20-19741",
3838
"apiVersion": "3.2.20",
3939
"homepage": "https://core.ai",
4040
"issues": {

assets/default-project/en.zip

0 Bytes
Binary file not shown.

assets/sample-projects/HTML5.zip

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

assets/sample-projects/explore.zip

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

brackets-min.js

Lines changed: 93 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -14115,6 +14115,7 @@ define("document/DocumentCommandHandlers", function (require, exports, module) {
1411514115
* @param {Object} commandData data
1411614116
*/
1411714117
function handleFileCloseWindow(commandData) {
14118+
_forceQuitIfNeeded();
1411814119
return _handleWindowGoingAway(
1411914120
commandData,
1412014121
function (closeSuccess) {
@@ -14133,14 +14134,63 @@ define("document/DocumentCommandHandlers", function (require, exports, module) {
1413314134
);
1413414135
}
1413514136

14136-
function handleFileNewWindow() {
14137+
function newPhoenixWindow(cliArgsArray = null) {
1413714138
let width = window.innerWidth;
1413814139
let height = window.innerHeight;
14139-
brackets.app.openURLInPhoenixWindow(location.href, {
14140-
width,
14141-
height,
14142-
preferTabs: true
14143-
});
14140+
Phoenix.app.openNewPhoenixEditorWindow(width, height, cliArgsArray);
14141+
}
14142+
14143+
async function _fileExists(fullPath) {
14144+
try {
14145+
const {entry} = await FileSystem.resolveAsync(fullPath);
14146+
return entry.isFile;
14147+
} catch (e) {
14148+
return false;
14149+
}
14150+
}
14151+
14152+
async function _openFilesPassedInFromCLI(args) {
14153+
if(!args || args.length <= 1){
14154+
return;
14155+
}
14156+
14157+
for(let i=1; i<args.length; i++) { // the first arg is the executable path itself, ignore that
14158+
try{
14159+
const fileToOpen = Phoenix.VFS.getTauriVirtualPath(args[i]);
14160+
const {entry} = await FileSystem.resolveAsync(fileToOpen);
14161+
if(entry.isFile){
14162+
FileViewController.openFileAndAddToWorkingSet(fileToOpen);
14163+
}
14164+
} catch (e) {
14165+
console.error("Error opening file passed in from cli: ", args[i], e);
14166+
}
14167+
}
14168+
}
14169+
14170+
async function _singleInstanceHandler(args) {
14171+
const isPrimary = await Phoenix.app.isPrimaryDesktopPhoenixWindow();
14172+
if(!isPrimary){
14173+
// only primary phoenix windows can open a new window, else every window is going to make its own
14174+
// window and cause a runaway phoenix window explosion.
14175+
return;
14176+
}
14177+
if(args.length > 1) {
14178+
// check if the second arg is a file, if so we just open it and the remaining files in this window
14179+
const fileToOpen = Phoenix.VFS.getTauriVirtualPath(args[1]);
14180+
const secondArgIsFile = await _fileExists(fileToOpen);
14181+
if(secondArgIsFile) {
14182+
await _openFilesPassedInFromCLI(args);
14183+
await Phoenix.app.focusWindow();
14184+
return;
14185+
}
14186+
}
14187+
newPhoenixWindow(args);
14188+
}
14189+
14190+
Phoenix.app.setSingleInstanceCLIArgsHandler(_singleInstanceHandler);
14191+
14192+
function handleFileNewWindow() {
14193+
newPhoenixWindow();
1414414194
}
1414514195

1414614196
/** Show a textfield to rename whatever is currently selected in the sidebar (or current doc if nothing else selected) */
@@ -14438,7 +14488,7 @@ define("document/DocumentCommandHandlers", function (require, exports, module) {
1443814488

1443914489
let closeInProgress;
1444014490
let closeClickCounter = 0;
14441-
const CLOSE_TIMER_RESET_INTERVAL = 3000;
14491+
const CLOSE_TIMER_RESET_INTERVAL = 4000;
1444214492
let closeTimer = setTimeout(()=>{
1444314493
closeClickCounter = 0;
1444414494
closeTimer = null;
@@ -14453,8 +14503,8 @@ define("document/DocumentCommandHandlers", function (require, exports, module) {
1445314503
closeClickCounter = 0;
1445414504
closeTimer = null;
1445514505
}, CLOSE_TIMER_RESET_INTERVAL);
14456-
if(closeClickCounter >= 3) {
14457-
// the user clicked the close button 3 times in the last 4 secs, he's desperate, close the window now!.
14506+
if(closeClickCounter >= 2) {
14507+
// the user clicked the close button 2 times in the last 4 secs, he's desperate, close the window now!.
1445814508
Phoenix.app.closeWindow();
1445914509
}
1446014510
}
@@ -112690,52 +112740,47 @@ define("project/ProjectManager", function (require, exports, module) {
112690112740
return updateWelcomeProjectPath(PreferencesManager.getViewState("projectPath"));
112691112741
}
112692112742

112743+
async function _dirExists(fullPath) {
112744+
try {
112745+
const {entry} = await FileSystem.resolveAsync(fullPath);
112746+
return entry.isDirectory;
112747+
} catch (e) {
112748+
return false;
112749+
}
112750+
}
112751+
112693112752
async function _getStartupProjectFromCLIArgs() {
112694-
return new Promise((resolve)=>{
112695-
Phoenix.app.getCommandLineArgs().then(args=>{
112696-
if(!args || args.length <= 1){ // the second arg is the folder we have to open
112697-
resolve(null);
112698-
return;
112699-
}
112700-
try{
112701-
const folderToOpen = Phoenix.VFS.getTauriVirtualPath(args[1]);
112702-
FileSystem.resolveAsync(folderToOpen)
112703-
.then(({entry})=>{
112704-
if(entry.isDirectory){
112705-
resolve(folderToOpen);
112706-
} else {
112707-
resolve(null);
112708-
}
112709-
})
112710-
.catch((err)=>{
112711-
console.error(err);
112712-
resolve(null);
112713-
});
112714-
} catch (e) {
112715-
resolve(null);
112716-
}
112717-
});
112718-
});
112753+
const args = await Phoenix.app.getCommandLineArgs();
112754+
if(!args || args.length <= 1){ // the second arg is the folder we have to open
112755+
return null;
112756+
}
112757+
try{
112758+
const folderToOpen = Phoenix.VFS.getTauriVirtualPath(args[1]);
112759+
const dirExists = await _dirExists(folderToOpen);
112760+
if(dirExists){
112761+
return folderToOpen;
112762+
}
112763+
} catch (e) {
112764+
console.error("Error getting startupProjectPath from CLI args", e);
112765+
}
112766+
return null;
112719112767
}
112720112768

112721112769
/**
112722112770
* Initial project path is stored in prefs, which defaults to the welcome project on
112723112771
* first launch.
112724112772
*/
112725-
function getStartupProjectPath() {
112726-
return new Promise((resolve)=>{
112727-
_getStartupProjectFromCLIArgs()
112728-
.then(cliProjectPath=>{
112729-
let startupProjectPath = cliProjectPath || updateWelcomeProjectPath(PreferencesManager.getViewState("projectPath"));
112730-
FileSystem.getDirectoryForPath(startupProjectPath).exists((err, exists)=>{
112731-
if(exists){
112732-
resolve(startupProjectPath);
112733-
} else {
112734-
resolve(getWelcomeProjectPath());
112735-
}
112736-
});
112737-
});
112738-
});
112773+
async function getStartupProjectPath() {
112774+
let startupProjectPath = await _getStartupProjectFromCLIArgs();
112775+
if(startupProjectPath){
112776+
return startupProjectPath;
112777+
}
112778+
startupProjectPath = updateWelcomeProjectPath(PreferencesManager.getViewState("projectPath"));
112779+
const dirExists = await _dirExists(startupProjectPath);
112780+
if(dirExists){
112781+
return startupProjectPath;
112782+
}
112783+
return getWelcomeProjectPath();
112739112784
}
112740112785

112741112786
/**

cacheManifest.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"appConfig.js": "159b4d525d5519f6a7055cf049a06f1f",
3-
"assets/default-project/en.zip": "08851dd672e5fce112f6d4179335b815",
2+
"appConfig.js": "d46c53cf8cd9dad781106ea6642af032",
3+
"assets/default-project/en.zip": "6d9012177cf5d407ea3566cf62323a2c",
44
"assets/default-project/en/images/cloud1.svg": "aca7bba84a2237f1c1988caea54a67a9",
55
"assets/default-project/en/images/cloud2.svg": "02880216ac461f1578ac8a18f158ce28",
66
"assets/default-project/en/images/cloud3.svg": "7a78bb29bd895ead8c171001244d9b7d",
@@ -120,7 +120,7 @@
120120
"assets/phoenix-splash/live-preview-error.html": "98b11e5ae0c9341ab1450e029065ac7b",
121121
"assets/phoenix-splash/no-preview.html": "2c51d14109552b59976145fe9ac33236",
122122
"assets/phoenix-splash/styles.css": "6809a039001526eeec64eeef1f0ad807",
123-
"assets/sample-projects/bootstrap-blog.zip": "8d55fcb37fea29de1cb1c544ae5e9417",
123+
"assets/sample-projects/bootstrap-blog.zip": "1551660bc47033a506dbf77a1622c16d",
124124
"assets/sample-projects/bootstrap-blog/assets/brand/bootstrap-logo-white.svg": "2e642df55357162ad28519305c8fd4fe",
125125
"assets/sample-projects/bootstrap-blog/assets/brand/bootstrap-logo.svg": "88eef7f3c2bcf988457a0e6d123c3f1d",
126126
"assets/sample-projects/bootstrap-blog/assets/dist/css/bootstrap.min.css": "6d9c6fda1e7087224431cc8068bb998f",
@@ -130,7 +130,7 @@
130130
"assets/sample-projects/bootstrap-blog/blog.rtl.css": "c6c275bf0b804d3dec264ec7fb3d7677",
131131
"assets/sample-projects/bootstrap-blog/index-rtl.html": "506e2d3fd1c4bb3651377144a62d5e82",
132132
"assets/sample-projects/bootstrap-blog/index.html": "dd8824ad3c9520dc0a825176d20eb694",
133-
"assets/sample-projects/dashboard.zip": "2be061a2bbd866fc7bedcfccfd575e19",
133+
"assets/sample-projects/dashboard.zip": "185de30177b1967e7337ac453afd034e",
134134
"assets/sample-projects/dashboard/assets/brand/bootstrap-logo-white.svg": "2e642df55357162ad28519305c8fd4fe",
135135
"assets/sample-projects/dashboard/assets/brand/bootstrap-logo.svg": "88eef7f3c2bcf988457a0e6d123c3f1d",
136136
"assets/sample-projects/dashboard/assets/dist/css/bootstrap.min.css": "6d9c6fda1e7087224431cc8068bb998f",
@@ -142,7 +142,7 @@
142142
"assets/sample-projects/dashboard/index.html": "ddfda6ea9dfc8e12a8dcbbf065c804de",
143143
"assets/sample-projects/dashboard/signin.css": "a71ff2b493f230e0d6585793c2115809",
144144
"assets/sample-projects/dashboard/signin.html": "b108c183dfa7e2da3d88ec79bee79509",
145-
"assets/sample-projects/explore.zip": "8a7c9377edde6124f42abf5f8aeab92a",
145+
"assets/sample-projects/explore.zip": "e3facf1912b752d9a9cae14fb96a83c6",
146146
"assets/sample-projects/explore/A-tribute-page.html": "007699e85177db3d1cd87d0d47440b36",
147147
"assets/sample-projects/explore/adjustable-fireworks.html": "706a0995d00d8ae009b5426cf7ee69be",
148148
"assets/sample-projects/explore/ant_colony.html": "d0885229e57caecc83049b50ee98560c",
@@ -232,7 +232,7 @@
232232
"assets/sample-projects/explore/watermelon-pixel.html": "6f6754e8073436bb823807a10a0446ea",
233233
"assets/sample-projects/explore/webmine.html": "9879458a48c757dc6671d408e940da4d",
234234
"assets/sample-projects/explore/whack-a-mole.html": "827f15c53657350b9c898fa27ecf15ac",
235-
"assets/sample-projects/home-pages.zip": "5ea5f30093ca740c8a0e54d5cd9110c2",
235+
"assets/sample-projects/home-pages.zip": "0c4205e169b12dac5a631ed3449849de",
236236
"assets/sample-projects/home-pages/album/index.html": "df20e4a479659463ab9d3f6b4ca4dbd1",
237237
"assets/sample-projects/home-pages/assets/brand/bootstrap-logo-white.svg": "2e642df55357162ad28519305c8fd4fe",
238238
"assets/sample-projects/home-pages/assets/brand/bootstrap-logo.svg": "88eef7f3c2bcf988457a0e6d123c3f1d",
@@ -244,28 +244,28 @@
244244
"assets/sample-projects/home-pages/carousel/index.html": "fc5bf7b2d8640a2c393f465294210e7c",
245245
"assets/sample-projects/home-pages/cover/cover.css": "3738586a82dd90263617020e7f1db82e",
246246
"assets/sample-projects/home-pages/cover/index.html": "a0ae1a11224672532b3466df93ce0821",
247-
"assets/sample-projects/HTML5.zip": "a38f7293fdd5ceab4a44caab4d42a45e",
247+
"assets/sample-projects/HTML5.zip": "9638969101ac37a2203c43ee97328503",
248248
"assets/sample-projects/HTML5/index.html": "ca318e370d63b3e083d3bd63052b8252",
249249
"assets/sample-projects/HTML5/script.js": "47de56d88cd6d866c4f77027128c0dd7",
250250
"assets/sample-projects/HTML5/styles.css": "8c798c8b3bba7e4d49dfe99b4deccd47",
251251
"assets/sample-projects/new-project-list.json": "52493b6373285d18a51a7e0319d812c2",
252252
"assets/sample-projects/zips/bootstrap.zip": "47b3132b5dbf324d6396188cf68ecae1",
253253
"base-config/keyboard.json": "fe78beab83ea31263c340439e97d4867",
254-
"brackets-min.js": "56f5f9f18554b24f6b8c6678c44b764f",
254+
"brackets-min.js": "6b0541a9d822afdd1c6432cfacab8036",
255255
"brackets.config.dist.json": "65a7ad178b006a23115433cead0e3dc4",
256256
"brackets.config.staging.json": "64d4ae88ab3bf0a0841ee76ef036991d",
257257
"brackets.js": "ec2ae12d8f29444312817b05ddf0c10e",
258-
"cacheManifest.json": "552985391e052748d2d7ee8ea8586466",
258+
"cacheManifest.json": "4a573796b9c04417b6e2471d204e78a0",
259259
"command/CommandManager.js": "8763fce16883bbef252604330ac3bf49",
260260
"command/Commands.js": "15ae60b455ceef44d09dbfbdebf05567",
261261
"command/DefaultMenus.js": "95ac6ecc14fc1a5f5681d8535df92964",
262262
"command/KeyBindingManager.js": "fef7621c53af1cec6e070b4be6b82a5f",
263263
"command/Menus.js": "1dc0ebdbebf8815667452d61ae63728e",
264-
"config.json": "ee8e3d022fc8ab1cf3e3f8da12ac055c",
264+
"config.json": "cdd875c54ff59fc1602b400920431cce",
265265
"devEnable.html": "5c494d5e246bdb4260557c03b73eea32",
266266
"document/ChangedDocumentTracker.js": "8763dbbd784b9e8a3614a8ee723d5273",
267267
"document/Document.js": "311174e3df23c37caf5d1783a6377f40",
268-
"document/DocumentCommandHandlers.js": "5911219517cf0ba8c755c2786c1d766a",
268+
"document/DocumentCommandHandlers.js": "e737cf955d28a2ee602afde4c110cd02",
269269
"document/DocumentManager.js": "fe178ffdc65fe336db7a2be3c11bc6d3",
270270
"document/InMemoryFile.js": "34c461337dea2e4b5886586a4f929e6e",
271271
"document/TextRange.js": "12463434e5dbacabd457911259a26c52",
@@ -863,7 +863,7 @@
863863
"NodeConnector.js": "019a124dc5b402116d971932b714e0a6",
864864
"phoenix/errno.js": "6ca6e445e77fc2060df5ba36d88a8846",
865865
"phoenix/init_vfs.js": "ae719496222b95a599018a225db629fd",
866-
"phoenix/shell.js": "2261829e129c9a631523c0eff72b0607",
866+
"phoenix/shell.js": "c193efb6432f6ad3ffd868718ebc787d",
867867
"phoenix/tauriShell.js": "6cb8aba882a54e13db38a3f74106f837",
868868
"phoenix/virtual-server-loader.js": "b357c2a0f5f0fba5db7002a5b83b25ef",
869869
"phoenix/virtualfs.js": "111d6f4f4299db4d55c47e16693a23e4",
@@ -882,7 +882,7 @@
882882
"project/FileTreeView.js": "fe84143b4e9e74012757e7d6078fb4c8",
883883
"project/FileTreeViewModel.js": "dccfbb087eb6de5017aaf1902c0c8899",
884884
"project/FileViewController.js": "882954f85e6fcc370eba7fb6cd0eeb83",
885-
"project/ProjectManager.js": "74420ce2af79e790f8ff7f3daeb6b2e2",
885+
"project/ProjectManager.js": "6a111b7070e5c298bd1348a0c9fa3bb3",
886886
"project/ProjectModel.js": "a0813bd4f38fcb5325938c68482a9d81",
887887
"project/SidebarView.js": "904ec1205dff6901725f2e0b0be117c1",
888888
"project/WorkingSetSort.js": "6afc1815ba2fea6def8cac4e9254c23f",

config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"extension_store_url": "https://store.core.ai/src/",
2323
"app_notification_url": "assets/notifications/dev/",
2424
"linting.enabled_by_default": true,
25-
"build_timestamp": "2024-01-19T05:19:31.563Z",
25+
"build_timestamp": "2024-01-19T11:44:31.643Z",
2626
"googleAnalyticsID": "G-P4HJFPDB76",
2727
"googleAnalyticsIDDesktop": "G-VE5BXWJ0HF",
2828
"mixPanelID": "49c4d164b592be2350fc7af06a259bf3",
@@ -33,7 +33,7 @@
3333
"bugsnagEnv": "development"
3434
},
3535
"name": "Phoenix",
36-
"version": "3.2.20-19740",
36+
"version": "3.2.20-19741",
3737
"apiVersion": "3.2.20",
3838
"homepage": "https://core.ai",
3939
"issues": {

0 commit comments

Comments
 (0)