@breakside/jskit 2021.43.0 → 2021.52.0
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/Frameworks/DOM.jsframework/Info.json +2 -2
- package/Frameworks/DOM.jsframework/io.breakside.JSKit.DOM-bundle.js +2 -2
- package/Frameworks/FontKit.jsframework/Info.json +2 -2
- package/Frameworks/FontKit.jsframework/io.breakside.JSKit.FontKit-bundle.js +2 -2
- package/Frameworks/Foundation.jsframework/Info.json +2 -2
- package/Frameworks/Foundation.jsframework/JS/Deflate.js +2 -3
- package/Frameworks/Foundation.jsframework/JS/Error+JS.js +10 -0
- package/Frameworks/Foundation.jsframework/JS/JSColor.js +15 -0
- package/Frameworks/Foundation.jsframework/JS/JSDate.js +6 -0
- package/Frameworks/Foundation.jsframework/JS/JSDateFormatter.js +2 -2
- package/Frameworks/Foundation.jsframework/JS/JSTimer.js +6 -0
- package/Frameworks/Foundation.jsframework/JS/JSURLResponse.js +60 -1
- package/Frameworks/Foundation.jsframework/JS/Zlib.js +2 -3
- package/Frameworks/Foundation.jsframework/io.breakside.JSKit.Foundation-bundle.js +2 -2
- package/Frameworks/SecurityKit.jsframework/Info.json +2 -2
- package/Frameworks/SecurityKit.jsframework/io.breakside.JSKit.SecurityKit-bundle.js +2 -2
- package/Info.json +2 -2
- package/Node/HTMLBuilder.js +2 -1
- package/Node/JavascriptCompilation.js +1 -1
- package/Node/io.breakside.jskit-bundle.js +2 -2
- package/Root/Frameworks/APIKit/APIError.js +2 -3
- package/Root/Frameworks/APIKit/Info.yaml +1 -1
- package/Root/Frameworks/APIKitTesting/Info.yaml +1 -1
- package/Root/Frameworks/AuthKit/Info.yaml +1 -1
- package/Root/Frameworks/CSSOM/Info.yaml +1 -1
- package/Root/Frameworks/ChartKit/Info.yaml +1 -1
- package/Root/Frameworks/ConferenceKit/Info.yaml +1 -1
- package/Root/Frameworks/DBKit/DBObjectDatabase.js +6 -5
- package/Root/Frameworks/DBKit/Info.yaml +1 -1
- package/Root/Frameworks/DOM/Info.yaml +1 -1
- package/Root/Frameworks/Dispatch/Info.yaml +1 -1
- package/Root/Frameworks/FontKit/Info.yaml +1 -1
- package/Root/Frameworks/Foundation/Deflate.js +2 -3
- package/Root/Frameworks/Foundation/Error+JS.js +10 -0
- package/Root/Frameworks/Foundation/Info.yaml +1 -1
- package/Root/Frameworks/Foundation/JSColor.js +15 -0
- package/Root/Frameworks/Foundation/JSDate.js +6 -0
- package/Root/Frameworks/Foundation/JSDateFormatter.js +2 -2
- package/Root/Frameworks/Foundation/JSTimer.js +6 -0
- package/Root/Frameworks/Foundation/JSURLResponse.js +60 -1
- package/Root/Frameworks/Foundation/Zlib.js +2 -3
- package/Root/Frameworks/ImageKit/IKDecoderPNG.js +1 -3
- package/Root/Frameworks/ImageKit/Info.yaml +1 -1
- package/Root/Frameworks/MediaKit/Info.yaml +1 -1
- package/Root/Frameworks/MediaKitUI/Info.yaml +1 -1
- package/Root/Frameworks/NotificationKit/Info.yaml +1 -1
- package/Root/Frameworks/PDFKit/Info.yaml +1 -1
- package/Root/Frameworks/QRKit/Info.yaml +1 -1
- package/Root/Frameworks/SearchKit/Info.yaml +1 -1
- package/Root/Frameworks/SecurityKit/Info.yaml +1 -1
- package/Root/Frameworks/ServerKit/Info.yaml +1 -1
- package/Root/Frameworks/ServerKit/SKFileJobQueue.js +3 -1
- package/Root/Frameworks/ServerKit/SKHTTPError.js +2 -3
- package/Root/Frameworks/ServerKit/SKHTTPRequest.js +7 -0
- package/Root/Frameworks/ServerKit/SKHTTPResponder.js +9 -2
- package/Root/Frameworks/ServerKit/SKUserAgent.js +130 -0
- package/Root/Frameworks/ServerKit/SKValidatingObject.js +1 -3
- package/Root/Frameworks/ServerKit/ServerKit.js +1 -0
- package/Root/Frameworks/ServerKitTesting/Info.yaml +1 -1
- package/Root/Frameworks/TestKit/Info.yaml +1 -1
- package/Root/Frameworks/UIKit/Info.yaml +1 -1
- package/Root/Frameworks/UIKit/UIAnimation.js +4 -0
- package/Root/Frameworks/UIKit/UIContainerView.js +1 -1
- package/Root/Frameworks/UIKit/UIContainerViewController.js +3 -35
- package/Root/Frameworks/UIKit/UIHTMLDisplayServerCanvasContext.js +6 -1
- package/Root/Frameworks/UIKit/UIImageLayer.js +12 -14
- package/Root/Frameworks/UIKit/UILayer.js +3 -0
- package/Root/Frameworks/UIKit/UIListView.js +44 -7
- package/Root/Frameworks/UIKit/UIListViewHeaderFooterView.js +34 -0
- package/Root/Frameworks/UIKit/UINavigationBar.js +4 -2
- package/Root/Frameworks/UIKit/UINavigationBarItem.js +11 -0
- package/Root/Frameworks/UIKit/UINavigationController.js +2 -2
- package/Root/Frameworks/UIKit/UISplitViewController.js +9 -87
- package/Root/Frameworks/UIKit/UITabView.js +2 -2
- package/Root/Frameworks/UIKit/UITabViewController.js +6 -5
- package/Root/Frameworks/UIKit/UITextLayer.js +11 -10
- package/Root/Frameworks/UIKit/UIView.js +15 -0
- package/Root/Frameworks/UIKit/UIViewController.js +39 -0
- package/Root/Frameworks/UIKit/UIWindowServer.js +2 -2
- package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.DOM",
|
|
4
|
-
"JSBundleVersion": "2021.
|
|
4
|
+
"JSBundleVersion": "2021.52.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"node": "DOM+Node.js"
|
|
10
10
|
},
|
|
11
11
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
12
|
-
"GitRevision": "
|
|
12
|
+
"GitRevision": "18a129f4ad0096b9e314e83d6f8bf41b90131e4d"
|
|
13
13
|
}
|
|
@@ -3,7 +3,7 @@ JSBundle.bundles['io.breakside.JSKit.DOM'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.DOM",
|
|
6
|
-
"JSBundleVersion": "2021.
|
|
6
|
+
"JSBundleVersion": "2021.52.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
@@ -11,7 +11,7 @@ JSBundle.bundles['io.breakside.JSKit.DOM'] = {
|
|
|
11
11
|
"node": "DOM+Node.js"
|
|
12
12
|
},
|
|
13
13
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
14
|
-
"GitRevision": "
|
|
14
|
+
"GitRevision": "18a129f4ad0096b9e314e83d6f8bf41b90131e4d"
|
|
15
15
|
},
|
|
16
16
|
"Resources": [],
|
|
17
17
|
"ResourceLookup": {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.FontKit",
|
|
4
|
-
"JSBundleVersion": "2021.
|
|
4
|
+
"JSBundleVersion": "2021.52.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
8
8
|
"html": "FontKit+HTML.js"
|
|
9
9
|
},
|
|
10
10
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
11
|
-
"GitRevision": "
|
|
11
|
+
"GitRevision": "18a129f4ad0096b9e314e83d6f8bf41b90131e4d"
|
|
12
12
|
}
|
|
@@ -3,14 +3,14 @@ JSBundle.bundles['io.breakside.JSKit.FontKit'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.FontKit",
|
|
6
|
-
"JSBundleVersion": "2021.
|
|
6
|
+
"JSBundleVersion": "2021.52.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
10
10
|
"html": "FontKit+HTML.js"
|
|
11
11
|
},
|
|
12
12
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
13
|
-
"GitRevision": "
|
|
13
|
+
"GitRevision": "18a129f4ad0096b9e314e83d6f8bf41b90131e4d"
|
|
14
14
|
},
|
|
15
15
|
"Resources": [],
|
|
16
16
|
"ResourceLookup": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.Foundation",
|
|
4
|
-
"JSBundleVersion": "2021.
|
|
4
|
+
"JSBundleVersion": "2021.52.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"node": "Foundation+Node.js"
|
|
10
10
|
},
|
|
11
11
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
12
|
-
"GitRevision": "
|
|
12
|
+
"GitRevision": "18a129f4ad0096b9e314e83d6f8bf41b90131e4d"
|
|
13
13
|
}
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
// #import "JSLog.js"
|
|
19
19
|
// #import "JSData.js"
|
|
20
20
|
// #import "CoreTypes.js"
|
|
21
|
+
// #import "Error+JS.js"
|
|
21
22
|
'use strict';
|
|
22
23
|
|
|
23
24
|
(function(){
|
|
@@ -1439,9 +1440,7 @@ function DeflateError(msg){
|
|
|
1439
1440
|
}
|
|
1440
1441
|
this.name = "DeflateError";
|
|
1441
1442
|
this.message = msg;
|
|
1442
|
-
|
|
1443
|
-
Error.captureStackTrace(this, DeflateError);
|
|
1444
|
-
}
|
|
1443
|
+
Error.captureStackTrace(this, DeflateError);
|
|
1445
1444
|
}
|
|
1446
1445
|
|
|
1447
1446
|
DeflateError.prototype = Object.create(Error.prototype);
|
|
@@ -38,6 +38,16 @@ Object.defineProperties(Error.prototype, {
|
|
|
38
38
|
|
|
39
39
|
});
|
|
40
40
|
|
|
41
|
+
if (!Error.captureStackTrace){
|
|
42
|
+
Error.captureStackTrace = function(instance, cls){
|
|
43
|
+
var e = new Error();
|
|
44
|
+
var lines = e.stack.split("\n");
|
|
45
|
+
lines.shift();
|
|
46
|
+
lines.shift();
|
|
47
|
+
instance.stack = lines.join("\n");
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
41
51
|
|
|
42
52
|
// Safari: searchChanged@https://test1.breakside.dev:8089/debug/JS/SidebarViewController.js:213:23
|
|
43
53
|
// Firefox: textStorageDidReplaceCharactersInRange@https://test1.breakside.dev:8089/debug/Frameworks/Foundation/JSTextLayoutManager.js:186:25
|
|
@@ -220,6 +220,21 @@ JSClass('JSColor', JSObject, {
|
|
|
220
220
|
}
|
|
221
221
|
components.push(alpha);
|
|
222
222
|
this.initWithSpaceAndComponents(space, components);
|
|
223
|
+
}else if (spec.containsKey("light") && this.initWithUIStyles){
|
|
224
|
+
var light = spec.valueForKey("light", JSColor);
|
|
225
|
+
var dark = light;
|
|
226
|
+
var lightContrast = light;
|
|
227
|
+
if (spec.containsKey("dark")){
|
|
228
|
+
dark = spec.valueForKey("dark", JSColor);
|
|
229
|
+
}
|
|
230
|
+
var darkContrast = dark;
|
|
231
|
+
if (spec.containsKey("lightContrast")){
|
|
232
|
+
lightContrast = spec.valueForKey("lightContrast", JSColor);
|
|
233
|
+
}
|
|
234
|
+
if (spec.containsKey("darkContrast")){
|
|
235
|
+
darkContrast = spec.valueForKey("darkContrast", JSColor);
|
|
236
|
+
}
|
|
237
|
+
this.initWithUIStyles(light, dark, lightContrast, darkContrast);
|
|
223
238
|
}
|
|
224
239
|
},
|
|
225
240
|
|
|
@@ -59,10 +59,16 @@ Object.defineProperties(JSDate.prototype, {
|
|
|
59
59
|
});
|
|
60
60
|
|
|
61
61
|
JSDate.initWithTimeIntervalSince1970 = function(timeInterval){
|
|
62
|
+
if (timeInterval === null || timeInterval === undefined){
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
62
65
|
return Object.create(JSDate.prototype, {timeIntervalSince1970: {value: timeInterval}});
|
|
63
66
|
};
|
|
64
67
|
|
|
65
68
|
JSDate.initWithTimeIntervalSinceNow = function(timeInterval){
|
|
69
|
+
if (timeInterval === null || timeInterval === undefined){
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
66
72
|
return JSDate.initWithTimeIntervalSince1970((Date.now() / 1000) + timeInterval);
|
|
67
73
|
};
|
|
68
74
|
|
|
@@ -453,9 +453,9 @@ JSClass("JSDateFormatter", JSObject, {
|
|
|
453
453
|
return Math.floor(ms / 100).toString();
|
|
454
454
|
}
|
|
455
455
|
if (n == 2){
|
|
456
|
-
return Math.floor(ms / 10).toString();
|
|
456
|
+
return Math.floor(ms / 10).toString().leftPaddedString("0", 2);
|
|
457
457
|
}
|
|
458
|
-
return Math.floor((ms * Math.pow(10, n - 3))).toString();
|
|
458
|
+
return Math.floor((ms * Math.pow(10, n - 3))).toString().leftPaddedString("0", n);
|
|
459
459
|
},
|
|
460
460
|
|
|
461
461
|
_z: function(n, date, components){
|
|
@@ -72,4 +72,10 @@ JSTimer.scheduledRepeatingTimerWithInterval = function(interval, action, target)
|
|
|
72
72
|
var timer = JSTimer.initWithInterval(interval, true, action, target);
|
|
73
73
|
timer.schedule();
|
|
74
74
|
return timer;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
JSTimer.waitInterval = function(interval){
|
|
78
|
+
return new Promise(function(resolve, reject){
|
|
79
|
+
JSTimer.scheduledTimerWithInterval(interval, resolve);
|
|
80
|
+
});
|
|
75
81
|
};
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
// #import "JSMIMEHeaderMap.js"
|
|
18
18
|
// #import "JSMediaType.js"
|
|
19
19
|
// #import "JSURL.js"
|
|
20
|
+
// #import "Error+JS.js"
|
|
20
21
|
'use strict';
|
|
21
22
|
|
|
22
23
|
JSClass("JSURLResponse", JSObject, {
|
|
@@ -92,6 +93,12 @@ JSClass("JSURLResponse", JSObject, {
|
|
|
92
93
|
|
|
93
94
|
getLocation: function(){
|
|
94
95
|
return JSURL.initWithString(this._headerMap.get("Location", null));
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
assertSuccess: function(){
|
|
99
|
+
if (this.statusClass !== JSURLResponse.StatusClass.success){
|
|
100
|
+
throw new JSURLResponseError(this);
|
|
101
|
+
}
|
|
95
102
|
}
|
|
96
103
|
|
|
97
104
|
});
|
|
@@ -154,4 +161,56 @@ JSURLResponse.StatusClass = {
|
|
|
154
161
|
redirect: 3,
|
|
155
162
|
clientError: 4,
|
|
156
163
|
serverError: 5
|
|
157
|
-
};
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
JSGlobalObject.JSURLResponseError = function(response){
|
|
167
|
+
if (this === undefined){
|
|
168
|
+
return new JSURLResponseError();
|
|
169
|
+
}
|
|
170
|
+
this.name = "JSURLResponseError";
|
|
171
|
+
if (response instanceof JSURLResponseError){
|
|
172
|
+
this.message = response.message;
|
|
173
|
+
this.response = response.response;
|
|
174
|
+
this.stack = response.stack;
|
|
175
|
+
}else{
|
|
176
|
+
this.response = response;
|
|
177
|
+
this.message = "Received %d from server".sprintf(response.statusCode);
|
|
178
|
+
Error.captureStackTrace(this, JSURLResponseError);
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
JSURLResponseError.prototype = Object.create(Error.prototype);
|
|
183
|
+
|
|
184
|
+
Object.defineProperties(JSURLResponseError.prototype, {
|
|
185
|
+
|
|
186
|
+
statusCode: {
|
|
187
|
+
value: function(){
|
|
188
|
+
return this.response.statusCode;
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
|
|
192
|
+
statusClass: {
|
|
193
|
+
value: function(){
|
|
194
|
+
return this.response.statusClass;
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
|
|
198
|
+
data: {
|
|
199
|
+
value: function(){
|
|
200
|
+
return this.response.data;
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
|
|
204
|
+
object: {
|
|
205
|
+
value: function(){
|
|
206
|
+
return this.response.object;
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
|
|
210
|
+
headerMap: {
|
|
211
|
+
value: function(){
|
|
212
|
+
return this.response.headerMap;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
});
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
// #import "JSLog.js"
|
|
20
20
|
// #import "JSData.js"
|
|
21
21
|
// #import "CoreTypes.js"
|
|
22
|
+
// #import "Error+JS.js"
|
|
22
23
|
'use strict';
|
|
23
24
|
|
|
24
25
|
(function(){
|
|
@@ -73,9 +74,7 @@ function ZlibError(msg){
|
|
|
73
74
|
}
|
|
74
75
|
this.name = "ZlibError";
|
|
75
76
|
this.message = msg;
|
|
76
|
-
|
|
77
|
-
Error.captureStackTrace(this, ZlibError);
|
|
78
|
-
}
|
|
77
|
+
Error.captureStackTrace(this, ZlibError);
|
|
79
78
|
}
|
|
80
79
|
|
|
81
80
|
ZlibError.prototype = Object.create(Error.prototype);
|
|
@@ -3,7 +3,7 @@ JSBundle.bundles['io.breakside.JSKit.Foundation'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.Foundation",
|
|
6
|
-
"JSBundleVersion": "2021.
|
|
6
|
+
"JSBundleVersion": "2021.52.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
@@ -11,7 +11,7 @@ JSBundle.bundles['io.breakside.JSKit.Foundation'] = {
|
|
|
11
11
|
"node": "Foundation+Node.js"
|
|
12
12
|
},
|
|
13
13
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
14
|
-
"GitRevision": "
|
|
14
|
+
"GitRevision": "18a129f4ad0096b9e314e83d6f8bf41b90131e4d"
|
|
15
15
|
},
|
|
16
16
|
"Resources": [
|
|
17
17
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.SecurityKit",
|
|
4
|
-
"JSBundleVersion": "2021.
|
|
4
|
+
"JSBundleVersion": "2021.52.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"node": "SecurityKit+Node.js"
|
|
10
10
|
},
|
|
11
11
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
12
|
-
"GitRevision": "
|
|
12
|
+
"GitRevision": "18a129f4ad0096b9e314e83d6f8bf41b90131e4d"
|
|
13
13
|
}
|
|
@@ -3,7 +3,7 @@ JSBundle.bundles['io.breakside.JSKit.SecurityKit'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.SecurityKit",
|
|
6
|
-
"JSBundleVersion": "2021.
|
|
6
|
+
"JSBundleVersion": "2021.52.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
@@ -11,7 +11,7 @@ JSBundle.bundles['io.breakside.JSKit.SecurityKit'] = {
|
|
|
11
11
|
"node": "SecurityKit+Node.js"
|
|
12
12
|
},
|
|
13
13
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
14
|
-
"GitRevision": "
|
|
14
|
+
"GitRevision": "18a129f4ad0096b9e314e83d6f8bf41b90131e4d"
|
|
15
15
|
},
|
|
16
16
|
"Resources": [],
|
|
17
17
|
"ResourceLookup": {
|
package/Info.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "node",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.jskit",
|
|
4
|
-
"JSBundleVersion": "2021.
|
|
4
|
+
"JSBundleVersion": "2021.52.0",
|
|
5
5
|
"JSExecutableName": "jskit",
|
|
6
6
|
"NPMOrganization": "breakside",
|
|
7
7
|
"JSResources": [
|
|
8
8
|
"Tests/HTMLTestRunner.js",
|
|
9
9
|
"Tests/NodeTestRunner.js"
|
|
10
10
|
],
|
|
11
|
-
"GitRevision": "
|
|
11
|
+
"GitRevision": "18a129f4ad0096b9e314e83d6f8bf41b90131e4d"
|
|
12
12
|
}
|
package/Node/HTMLBuilder.js
CHANGED
|
@@ -743,7 +743,8 @@ JSClass("HTMLBuilder", Builder, {
|
|
|
743
743
|
var params = {
|
|
744
744
|
JSKIT_APP: JSON.stringify({
|
|
745
745
|
buildId: this.buildId,
|
|
746
|
-
|
|
746
|
+
environment: this.project.info.HTMLApplicationEnvironment,
|
|
747
|
+
sources: sources,
|
|
747
748
|
}, null, 2)
|
|
748
749
|
};
|
|
749
750
|
var workerConents = await this.fileManager.contentsAtURL(this.serviceWorkerSourceURL);
|
|
@@ -132,7 +132,7 @@ JSClass("JavascriptCompilation", JSObject, {
|
|
|
132
132
|
var mapURL = url.appendingFileExtension('.map');
|
|
133
133
|
var map = {
|
|
134
134
|
version: 3,
|
|
135
|
-
file:
|
|
135
|
+
file: url.lastPathComponent,
|
|
136
136
|
sourceRoot: this.sourceRoot,
|
|
137
137
|
sources: this.sources,
|
|
138
138
|
names: [],
|
|
@@ -3,14 +3,14 @@ JSBundle.bundles['io.breakside.jskit'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "node",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.jskit",
|
|
6
|
-
"JSBundleVersion": "2021.
|
|
6
|
+
"JSBundleVersion": "2021.52.0",
|
|
7
7
|
"JSExecutableName": "jskit",
|
|
8
8
|
"NPMOrganization": "breakside",
|
|
9
9
|
"JSResources": [
|
|
10
10
|
"Tests/HTMLTestRunner.js",
|
|
11
11
|
"Tests/NodeTestRunner.js"
|
|
12
12
|
],
|
|
13
|
-
"GitRevision": "
|
|
13
|
+
"GitRevision": "18a129f4ad0096b9e314e83d6f8bf41b90131e4d"
|
|
14
14
|
},
|
|
15
15
|
"Resources": [
|
|
16
16
|
{
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
// See the License for the specific language governing permissions and
|
|
14
14
|
// limitations under the License.
|
|
15
15
|
|
|
16
|
+
// #import Foundation
|
|
16
17
|
'use strict';
|
|
17
18
|
|
|
18
19
|
JSGlobalObject.APIError = function(statusCode, message){
|
|
@@ -26,9 +27,7 @@ JSGlobalObject.APIError = function(statusCode, message){
|
|
|
26
27
|
this.statusCode = statusCode;
|
|
27
28
|
this.message = message;
|
|
28
29
|
}
|
|
29
|
-
|
|
30
|
-
Error.captureStackTrace(this, APIError);
|
|
31
|
-
}
|
|
30
|
+
Error.captureStackTrace(this, APIError);
|
|
32
31
|
};
|
|
33
32
|
|
|
34
33
|
JSGlobalObject.APIError.prototype = Object.create(Error.prototype);
|
|
@@ -197,16 +197,17 @@ JSClass("DBObjectDatabase", JSObject, {
|
|
|
197
197
|
|
|
198
198
|
exclusiveSave: function(id, change, completion, target){
|
|
199
199
|
if (!completion){
|
|
200
|
-
completion = Promise.completion(Promise.
|
|
200
|
+
completion = Promise.completion(Promise.resolveNonNull);
|
|
201
201
|
}
|
|
202
202
|
if (!DBID.isValid(id)){
|
|
203
203
|
logger.error("Cannot save change without a valid id");
|
|
204
|
-
JSRunLoop.main.schedule.call(completion, target,
|
|
204
|
+
JSRunLoop.main.schedule.call(completion, target, null);
|
|
205
205
|
}else if (this.store.exclusiveSave){
|
|
206
206
|
var db = this;
|
|
207
|
+
var changedStorable = null;
|
|
207
208
|
this.store.exclusiveSave(id, function(dictionary, changeCompletion){
|
|
208
209
|
var storable = db.storableFromStorableDictionary(dictionary);
|
|
209
|
-
|
|
210
|
+
changedStorable = change(storable);
|
|
210
211
|
if (changedStorable === undefined){
|
|
211
212
|
changedStorable = storable;
|
|
212
213
|
}
|
|
@@ -218,11 +219,11 @@ JSClass("DBObjectDatabase", JSObject, {
|
|
|
218
219
|
});
|
|
219
220
|
}
|
|
220
221
|
}, function(success){
|
|
221
|
-
completion.call(target, success);
|
|
222
|
+
completion.call(target, success ? changedStorable : null);
|
|
222
223
|
});
|
|
223
224
|
}else{
|
|
224
225
|
logger.error("%{public} does not support exclusiveSave", this.store.$class.className);
|
|
225
|
-
JSRunLoop.main.schedule(completion, target,
|
|
226
|
+
JSRunLoop.main.schedule(completion, target, null);
|
|
226
227
|
}
|
|
227
228
|
return completion.promise;
|
|
228
229
|
},
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
// #import "JSLog.js"
|
|
19
19
|
// #import "JSData.js"
|
|
20
20
|
// #import "CoreTypes.js"
|
|
21
|
+
// #import "Error+JS.js"
|
|
21
22
|
'use strict';
|
|
22
23
|
|
|
23
24
|
(function(){
|
|
@@ -1439,9 +1440,7 @@ function DeflateError(msg){
|
|
|
1439
1440
|
}
|
|
1440
1441
|
this.name = "DeflateError";
|
|
1441
1442
|
this.message = msg;
|
|
1442
|
-
|
|
1443
|
-
Error.captureStackTrace(this, DeflateError);
|
|
1444
|
-
}
|
|
1443
|
+
Error.captureStackTrace(this, DeflateError);
|
|
1445
1444
|
}
|
|
1446
1445
|
|
|
1447
1446
|
DeflateError.prototype = Object.create(Error.prototype);
|
|
@@ -38,6 +38,16 @@ Object.defineProperties(Error.prototype, {
|
|
|
38
38
|
|
|
39
39
|
});
|
|
40
40
|
|
|
41
|
+
if (!Error.captureStackTrace){
|
|
42
|
+
Error.captureStackTrace = function(instance, cls){
|
|
43
|
+
var e = new Error();
|
|
44
|
+
var lines = e.stack.split("\n");
|
|
45
|
+
lines.shift();
|
|
46
|
+
lines.shift();
|
|
47
|
+
instance.stack = lines.join("\n");
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
41
51
|
|
|
42
52
|
// Safari: searchChanged@https://test1.breakside.dev:8089/debug/JS/SidebarViewController.js:213:23
|
|
43
53
|
// Firefox: textStorageDidReplaceCharactersInRange@https://test1.breakside.dev:8089/debug/Frameworks/Foundation/JSTextLayoutManager.js:186:25
|
|
@@ -220,6 +220,21 @@ JSClass('JSColor', JSObject, {
|
|
|
220
220
|
}
|
|
221
221
|
components.push(alpha);
|
|
222
222
|
this.initWithSpaceAndComponents(space, components);
|
|
223
|
+
}else if (spec.containsKey("light") && this.initWithUIStyles){
|
|
224
|
+
var light = spec.valueForKey("light", JSColor);
|
|
225
|
+
var dark = light;
|
|
226
|
+
var lightContrast = light;
|
|
227
|
+
if (spec.containsKey("dark")){
|
|
228
|
+
dark = spec.valueForKey("dark", JSColor);
|
|
229
|
+
}
|
|
230
|
+
var darkContrast = dark;
|
|
231
|
+
if (spec.containsKey("lightContrast")){
|
|
232
|
+
lightContrast = spec.valueForKey("lightContrast", JSColor);
|
|
233
|
+
}
|
|
234
|
+
if (spec.containsKey("darkContrast")){
|
|
235
|
+
darkContrast = spec.valueForKey("darkContrast", JSColor);
|
|
236
|
+
}
|
|
237
|
+
this.initWithUIStyles(light, dark, lightContrast, darkContrast);
|
|
223
238
|
}
|
|
224
239
|
},
|
|
225
240
|
|
|
@@ -59,10 +59,16 @@ Object.defineProperties(JSDate.prototype, {
|
|
|
59
59
|
});
|
|
60
60
|
|
|
61
61
|
JSDate.initWithTimeIntervalSince1970 = function(timeInterval){
|
|
62
|
+
if (timeInterval === null || timeInterval === undefined){
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
62
65
|
return Object.create(JSDate.prototype, {timeIntervalSince1970: {value: timeInterval}});
|
|
63
66
|
};
|
|
64
67
|
|
|
65
68
|
JSDate.initWithTimeIntervalSinceNow = function(timeInterval){
|
|
69
|
+
if (timeInterval === null || timeInterval === undefined){
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
66
72
|
return JSDate.initWithTimeIntervalSince1970((Date.now() / 1000) + timeInterval);
|
|
67
73
|
};
|
|
68
74
|
|