@breakside/jskit 2021.42.0 → 2021.46.1

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.
Files changed (86) hide show
  1. package/Frameworks/DOM.jsframework/Info.json +2 -2
  2. package/Frameworks/DOM.jsframework/io.breakside.JSKit.DOM-bundle.js +2 -2
  3. package/Frameworks/FontKit.jsframework/Info.json +2 -2
  4. package/Frameworks/FontKit.jsframework/io.breakside.JSKit.FontKit-bundle.js +2 -2
  5. package/Frameworks/Foundation.jsframework/Info.json +2 -2
  6. package/Frameworks/Foundation.jsframework/JS/Deflate.js +2 -3
  7. package/Frameworks/Foundation.jsframework/JS/Error+JS.js +10 -0
  8. package/Frameworks/Foundation.jsframework/JS/JSClass.js +8 -5
  9. package/Frameworks/Foundation.jsframework/JS/JSColor.js +15 -0
  10. package/Frameworks/Foundation.jsframework/JS/JSDate.js +6 -0
  11. package/Frameworks/Foundation.jsframework/JS/JSDateFormatter.js +2 -2
  12. package/Frameworks/Foundation.jsframework/JS/JSImage.js +1 -0
  13. package/Frameworks/Foundation.jsframework/JS/JSTimeZone.js +6 -2
  14. package/Frameworks/Foundation.jsframework/JS/JSURLResponse.js +60 -1
  15. package/Frameworks/Foundation.jsframework/JS/Zlib.js +2 -3
  16. package/Frameworks/Foundation.jsframework/io.breakside.JSKit.Foundation-bundle.js +2 -2
  17. package/Frameworks/SecurityKit.jsframework/Info.json +2 -2
  18. package/Frameworks/SecurityKit.jsframework/io.breakside.JSKit.SecurityKit-bundle.js +2 -2
  19. package/Info.json +2 -2
  20. package/Node/HTMLBuilder.js +2 -1
  21. package/Node/JavascriptCompilation.js +1 -1
  22. package/Node/io.breakside.jskit-bundle.js +2 -2
  23. package/Root/Frameworks/APIKit/APIError.js +2 -3
  24. package/Root/Frameworks/APIKit/Info.yaml +1 -1
  25. package/Root/Frameworks/APIKitTesting/Info.yaml +1 -1
  26. package/Root/Frameworks/AuthKit/Info.yaml +1 -1
  27. package/Root/Frameworks/CSSOM/Info.yaml +1 -1
  28. package/Root/Frameworks/ChartKit/Info.yaml +1 -1
  29. package/Root/Frameworks/ConferenceKit/Info.yaml +1 -1
  30. package/Root/Frameworks/DBKit/DBObjectDatabase.js +6 -5
  31. package/Root/Frameworks/DBKit/Info.yaml +1 -1
  32. package/Root/Frameworks/DOM/Info.yaml +1 -1
  33. package/Root/Frameworks/Dispatch/Info.yaml +1 -1
  34. package/Root/Frameworks/FontKit/Info.yaml +1 -1
  35. package/Root/Frameworks/Foundation/Deflate.js +2 -3
  36. package/Root/Frameworks/Foundation/Error+JS.js +10 -0
  37. package/Root/Frameworks/Foundation/Info.yaml +1 -1
  38. package/Root/Frameworks/Foundation/JSClass.js +8 -5
  39. package/Root/Frameworks/Foundation/JSColor.js +15 -0
  40. package/Root/Frameworks/Foundation/JSDate.js +6 -0
  41. package/Root/Frameworks/Foundation/JSDateFormatter.js +2 -2
  42. package/Root/Frameworks/Foundation/JSImage.js +1 -0
  43. package/Root/Frameworks/Foundation/JSTimeZone.js +6 -2
  44. package/Root/Frameworks/Foundation/JSURLResponse.js +60 -1
  45. package/Root/Frameworks/Foundation/Zlib.js +2 -3
  46. package/Root/Frameworks/ImageKit/IKDecoderPNG.js +1 -3
  47. package/Root/Frameworks/ImageKit/Info.yaml +1 -1
  48. package/Root/Frameworks/MediaKit/Info.yaml +1 -1
  49. package/Root/Frameworks/MediaKitUI/Info.yaml +1 -1
  50. package/Root/Frameworks/NotificationKit/Info.yaml +1 -1
  51. package/Root/Frameworks/PDFKit/Info.yaml +1 -1
  52. package/Root/Frameworks/QRKit/Info.yaml +1 -1
  53. package/Root/Frameworks/SearchKit/Info.yaml +1 -1
  54. package/Root/Frameworks/SecurityKit/Info.yaml +1 -1
  55. package/Root/Frameworks/ServerKit/Info.yaml +1 -1
  56. package/Root/Frameworks/ServerKit/SKFileJobQueue.js +3 -1
  57. package/Root/Frameworks/ServerKit/SKHTTPError.js +2 -3
  58. package/Root/Frameworks/ServerKit/SKHTTPRequest.js +7 -0
  59. package/Root/Frameworks/ServerKit/SKHTTPResponder.js +9 -2
  60. package/Root/Frameworks/ServerKit/SKUserAgent.js +130 -0
  61. package/Root/Frameworks/ServerKit/SKValidatingObject.js +1 -3
  62. package/Root/Frameworks/ServerKit/ServerKit.js +1 -0
  63. package/Root/Frameworks/ServerKitTesting/Info.yaml +1 -1
  64. package/Root/Frameworks/TestKit/Info.yaml +1 -1
  65. package/Root/Frameworks/UIKit/Info.yaml +1 -1
  66. package/Root/Frameworks/UIKit/UIAnimation.js +4 -0
  67. package/Root/Frameworks/UIKit/UIContainerView.js +1 -1
  68. package/Root/Frameworks/UIKit/UIContainerViewController.js +3 -35
  69. package/Root/Frameworks/UIKit/UIHTMLDisplayServerCanvasContext.js +6 -1
  70. package/Root/Frameworks/UIKit/UIImageLayer.js +12 -14
  71. package/Root/Frameworks/UIKit/UILayer.js +20 -0
  72. package/Root/Frameworks/UIKit/UIListView.js +52 -12
  73. package/Root/Frameworks/UIKit/UIListViewHeaderFooterView.js +34 -0
  74. package/Root/Frameworks/UIKit/UINavigationBar.js +4 -2
  75. package/Root/Frameworks/UIKit/UINavigationBarItem.js +11 -0
  76. package/Root/Frameworks/UIKit/UINavigationController.js +2 -2
  77. package/Root/Frameworks/UIKit/UISplitViewController.js +9 -87
  78. package/Root/Frameworks/UIKit/UITabView.js +2 -2
  79. package/Root/Frameworks/UIKit/UITabViewController.js +6 -5
  80. package/Root/Frameworks/UIKit/UITextLayer.js +11 -10
  81. package/Root/Frameworks/UIKit/UIView.js +16 -0
  82. package/Root/Frameworks/UIKit/UIViewController.js +36 -0
  83. package/Root/Frameworks/UIKit/UIWindow.js +37 -3
  84. package/Root/Frameworks/UIKit/UIWindowServer.js +2 -2
  85. package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
  86. 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.42.0",
4
+ "JSBundleVersion": "2021.46.1",
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": "d0ac389ad998143d223318cd13d9a7e12313102e"
12
+ "GitRevision": "2a8bd13bf7170f551cc9d039331cab119fbaefdc"
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.42.0",
6
+ "JSBundleVersion": "2021.46.1",
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": "d0ac389ad998143d223318cd13d9a7e12313102e"
14
+ "GitRevision": "2a8bd13bf7170f551cc9d039331cab119fbaefdc"
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.42.0",
4
+ "JSBundleVersion": "2021.46.1",
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": "d0ac389ad998143d223318cd13d9a7e12313102e"
11
+ "GitRevision": "2a8bd13bf7170f551cc9d039331cab119fbaefdc"
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.42.0",
6
+ "JSBundleVersion": "2021.46.1",
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": "d0ac389ad998143d223318cd13d9a7e12313102e"
13
+ "GitRevision": "2a8bd13bf7170f551cc9d039331cab119fbaefdc"
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.42.0",
4
+ "JSBundleVersion": "2021.46.1",
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": "d0ac389ad998143d223318cd13d9a7e12313102e"
12
+ "GitRevision": "2a8bd13bf7170f551cc9d039331cab119fbaefdc"
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
- if (Error.captureStackTrace){
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
@@ -354,11 +354,11 @@ JSReadOnlyProperty.prototype.define = function(C, publicKey, extensions){
354
354
  });
355
355
  };
356
356
 
357
- JSGlobalObject.JSLazyInitProperty = function(propertyInitMethodName, privateKey){
357
+ JSGlobalObject.JSLazyInitProperty = function(propertyInitMethod, privateKey){
358
358
  if (this === undefined){
359
- return new JSLazyInitProperty(propertyInitMethodName, privateKey);
359
+ return new JSLazyInitProperty(propertyInitMethod, privateKey);
360
360
  }else{
361
- this.propertyInitMethodName = propertyInitMethodName;
361
+ this.propertyInitMethod = propertyInitMethod;
362
362
  this.privateKey = privateKey;
363
363
  }
364
364
  };
@@ -366,7 +366,7 @@ JSGlobalObject.JSLazyInitProperty = function(propertyInitMethodName, privateKey)
366
366
  JSLazyInitProperty.prototype = Object.create(JSCustomProperty.prototype);
367
367
 
368
368
  JSLazyInitProperty.prototype.define = function(C, key, extensions){
369
- var propertyInitMethodName = this.propertyInitMethodName;
369
+ var propertyInitMethod = this.propertyInitMethod;
370
370
  var privateKey = this.privateKey;
371
371
  if (privateKey){
372
372
  Object.defineProperty(C.prototype, privateKey, {configurable: true, writable: true, value: null});
@@ -375,7 +375,10 @@ JSLazyInitProperty.prototype.define = function(C, key, extensions){
375
375
  configurable: true,
376
376
  enumerable: false,
377
377
  get: function(){
378
- var x = this[propertyInitMethodName]();
378
+ if (typeof(propertyInitMethod) != "function"){
379
+ propertyInitMethod = this[propertyInitMethod];
380
+ }
381
+ var x = propertyInitMethod.call(this);
379
382
  Object.defineProperty(this, key, {
380
383
  configurable: true,
381
384
  enumerable: false,
@@ -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){
@@ -279,6 +279,7 @@ JSClass("_JSDataImage", JSImage, {
279
279
  var image = _JSDataImage.init();
280
280
  _JSDataImage.$super.copy.call(this, image);
281
281
  image.data = this.data;
282
+ image.contentType = this.contentType;
282
283
  return image;
283
284
  },
284
285
 
@@ -536,7 +536,11 @@ var defaultLocalProperty = {
536
536
  get: function JSTimeZone_getLocal(){
537
537
  var timezone = null;
538
538
  if (localIdentifier !== null){
539
- timezone = JSTimeZone.initWithIdentifier(localIdentifier);
539
+ if (localIdentifier === "UTC"){
540
+ timezone = JSTimeZone.utc;
541
+ }else{
542
+ timezone = JSTimeZone.initWithIdentifier(localIdentifier);
543
+ }
540
544
  }
541
545
  Object.defineProperty(JSTimeZone, 'local', {configurable: true, value: timezone});
542
546
  return timezone;
@@ -557,7 +561,7 @@ Object.defineProperties(JSTimeZone, {
557
561
  systemTimeZoneIdentifier: {
558
562
  get: function JSTimeZone_getSystemTimeZoneIdentifier(){
559
563
  // FIXME: if no identifier, try to guess based on offset?
560
- return Intl.DateTimeFormat().resolvedOptions().timeZone || null;
564
+ return Intl.DateTimeFormat().resolvedOptions().timeZone || "UTC";
561
565
  }
562
566
  },
563
567
 
@@ -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
- if (Error.captureStackTrace){
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.42.0",
6
+ "JSBundleVersion": "2021.46.1",
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": "d0ac389ad998143d223318cd13d9a7e12313102e"
14
+ "GitRevision": "2a8bd13bf7170f551cc9d039331cab119fbaefdc"
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.42.0",
4
+ "JSBundleVersion": "2021.46.1",
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": "d0ac389ad998143d223318cd13d9a7e12313102e"
12
+ "GitRevision": "2a8bd13bf7170f551cc9d039331cab119fbaefdc"
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.42.0",
6
+ "JSBundleVersion": "2021.46.1",
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": "d0ac389ad998143d223318cd13d9a7e12313102e"
14
+ "GitRevision": "2a8bd13bf7170f551cc9d039331cab119fbaefdc"
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.42.0",
4
+ "JSBundleVersion": "2021.46.1",
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": "d0ac389ad998143d223318cd13d9a7e12313102e"
11
+ "GitRevision": "2a8bd13bf7170f551cc9d039331cab119fbaefdc"
12
12
  }
@@ -743,7 +743,8 @@ JSClass("HTMLBuilder", Builder, {
743
743
  var params = {
744
744
  JSKIT_APP: JSON.stringify({
745
745
  buildId: this.buildId,
746
- sources: sources
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: mapURL.lastPathComponent,
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.42.0",
6
+ "JSBundleVersion": "2021.46.1",
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": "d0ac389ad998143d223318cd13d9a7e12313102e"
13
+ "GitRevision": "2a8bd13bf7170f551cc9d039331cab119fbaefdc"
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
- if (Error.captureStackTrace){
30
- Error.captureStackTrace(this, APIError);
31
- }
30
+ Error.captureStackTrace(this, APIError);
32
31
  };
33
32
 
34
33
  JSGlobalObject.APIError.prototype = Object.create(Error.prototype);
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.APIKit
3
- JSBundleVersion: 2021.42.0
3
+ JSBundleVersion: 2021.46.1
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSIncludeDirectories:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.APIKitTesting
3
- JSBundleVersion: 2021.42.0
3
+ JSBundleVersion: 2021.46.1
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSLicenseNotice: |
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.AuthKit
3
- JSBundleVersion: 2021.42.0
3
+ JSBundleVersion: 2021.46.1
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSLicenseNotice: |
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.CSSOM
3
- JSBundleVersion: 2021.42.0
3
+ JSBundleVersion: 2021.46.1
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.ChartKit
3
- JSBundleVersion: 2021.42.0
3
+ JSBundleVersion: 2021.46.1
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2021 Breakside Inc.
6
6
  # JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.ConferenceKit
3
- JSBundleVersion: 2021.42.0
3
+ JSBundleVersion: 2021.46.1
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -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.resolveTrue);
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, false);
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
- var changedStorable = change(storable);
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, false);
226
+ JSRunLoop.main.schedule(completion, target, null);
226
227
  }
227
228
  return completion.promise;
228
229
  },
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.DBKit
3
- JSBundleVersion: 2021.42.0
3
+ JSBundleVersion: 2021.46.1
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.DOM
3
- JSBundleVersion: 2021.42.0
3
+ JSBundleVersion: 2021.46.1
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.Dispatch
3
- JSBundleVersion: 2021.42.0
3
+ JSBundleVersion: 2021.46.1
4
4
  JSCopyright: Copyright © 2020 Breakside Inc.
5
5
  JSBundleEnvironments:
6
6
  html: Dispatch+HTML.js
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.FontKit
3
- JSBundleVersion: 2021.42.0
3
+ JSBundleVersion: 2021.46.1
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -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
- if (Error.captureStackTrace){
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