@breakside/jskit 2025.1.2 → 2025.2.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.
- 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/JSLog.js +32 -2
- package/Frameworks/Foundation.jsframework/JS/JSURLRequest.js +7 -1
- package/Frameworks/Foundation.jsframework/io.breakside.JSKit.Foundation-bundle.js +2 -2
- package/Frameworks/Foundation.jsframework/sources.json +6 -6
- 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/Printer.js +25 -16
- package/Node/io.breakside.jskit-bundle.js +2 -2
- package/Node/jskit +2 -2
- 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/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/Info.yaml +1 -1
- package/Root/Frameworks/Foundation/JSLog.js +32 -2
- package/Root/Frameworks/Foundation/JSURLRequest.js +7 -1
- 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/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/UIApplication.js +9 -0
- package/Root/Frameworks/UIKit/UIViewController.js +12 -1
- 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": "2025.1
|
|
4
|
+
"JSBundleVersion": "2025.2.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": "
|
|
12
|
+
"GitRevision": "35aee1b170bca21048d178ff93b39a1b48885bda"
|
|
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": "2025.1
|
|
6
|
+
"JSBundleVersion": "2025.2.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": "
|
|
14
|
+
"GitRevision": "35aee1b170bca21048d178ff93b39a1b48885bda"
|
|
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": "2025.1
|
|
4
|
+
"JSBundleVersion": "2025.2.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": "
|
|
11
|
+
"GitRevision": "35aee1b170bca21048d178ff93b39a1b48885bda"
|
|
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": "2025.1
|
|
6
|
+
"JSBundleVersion": "2025.2.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": "
|
|
13
|
+
"GitRevision": "35aee1b170bca21048d178ff93b39a1b48885bda"
|
|
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": "2025.1
|
|
4
|
+
"JSBundleVersion": "2025.2.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": "
|
|
12
|
+
"GitRevision": "35aee1b170bca21048d178ff93b39a1b48885bda"
|
|
13
13
|
}
|
|
@@ -50,6 +50,23 @@ JSLogBuffer.prototype = {
|
|
|
50
50
|
return this.array.slice(0, this.length);
|
|
51
51
|
}
|
|
52
52
|
return this.array.slice(this.writeIndex).concat(this.array.slice(0, this.writeIndex));
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
read: function(recordIndex){
|
|
56
|
+
if (recordIndex < 0){
|
|
57
|
+
recordIndex = this.length + recordIndex;
|
|
58
|
+
}
|
|
59
|
+
if (recordIndex < 0){
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
if (recordIndex >= this.length){
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
if (this.length < this.capacity){
|
|
66
|
+
return this.array[recordIndex];
|
|
67
|
+
}
|
|
68
|
+
var index = (this.writeIndex + this.capacity + recordIndex) % this.capacity;
|
|
69
|
+
return this.array[index];
|
|
53
70
|
}
|
|
54
71
|
};
|
|
55
72
|
|
|
@@ -81,7 +98,8 @@ var defaultConfiguration = {
|
|
|
81
98
|
print: true,
|
|
82
99
|
console: console,
|
|
83
100
|
handlers: null,
|
|
84
|
-
parent: null
|
|
101
|
+
parent: null,
|
|
102
|
+
suppressDuplicates: false,
|
|
85
103
|
};
|
|
86
104
|
|
|
87
105
|
var createConfiguration = function(parent){
|
|
@@ -131,7 +149,7 @@ JSLog.getOrCreateConfig = function(subsystem, category){
|
|
|
131
149
|
JSLog.configure = function(configuration, level, subsystem, category){
|
|
132
150
|
var config = JSLog.getOrCreateConfig(subsystem, category);
|
|
133
151
|
for (var property in configuration){
|
|
134
|
-
if (property === 'enabled' || property === 'print' || property === 'console'){
|
|
152
|
+
if (property === 'enabled' || property === 'print' || property === 'console' || property === "suppressDuplicates"){
|
|
135
153
|
config[level][property] = configuration[property];
|
|
136
154
|
}
|
|
137
155
|
}
|
|
@@ -189,6 +207,10 @@ JSLog.write = function(record){
|
|
|
189
207
|
JSLog.buffer.write(record);
|
|
190
208
|
};
|
|
191
209
|
|
|
210
|
+
JSLog.recordsAreEqual = function(a, b){
|
|
211
|
+
return a.subsystem === b.subsystem && a.category === b.category && a.level === b.level && a.message === b.message;
|
|
212
|
+
};
|
|
213
|
+
|
|
192
214
|
JSLog.getRecords = function(){
|
|
193
215
|
return this.buffer.readAll();
|
|
194
216
|
};
|
|
@@ -308,6 +330,14 @@ JSLog.prototype = {
|
|
|
308
330
|
}
|
|
309
331
|
}
|
|
310
332
|
}
|
|
333
|
+
if (config.suppressDuplicates){
|
|
334
|
+
var previous = JSLog.buffer.read(-1);
|
|
335
|
+
if (previous !== null && JSLog.recordsAreEqual(previous, record)){
|
|
336
|
+
if (record.timestamp - previous.timestamp < 5){
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
311
341
|
JSLog.write(record);
|
|
312
342
|
if (config.print){
|
|
313
343
|
config.console[record.level](JSLog.format(record) + JSLog.formatStacktrace(record));
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
// #import "JSURL.js"
|
|
18
18
|
// #import "JSMIMEHeaderMap.js"
|
|
19
19
|
// #import "JSMediaType.js"
|
|
20
|
+
// #import "UUID.js"
|
|
21
|
+
// #import "JSSHA1Hash.js"
|
|
20
22
|
'use strict';
|
|
21
23
|
|
|
22
24
|
JSClass("JSURLRequest", JSObject, {
|
|
@@ -132,7 +134,11 @@ JSClass("JSURLRequest", JSObject, {
|
|
|
132
134
|
return;
|
|
133
135
|
}
|
|
134
136
|
this.headerMap.add("Authorization", "Bearer " + token);
|
|
135
|
-
}
|
|
137
|
+
},
|
|
138
|
+
|
|
139
|
+
uniqueIdentifier: JSLazyInitProperty(function(){
|
|
140
|
+
return JSSHA1Hash(UUID.init().bytes).hexStringRepresentation();
|
|
141
|
+
})
|
|
136
142
|
|
|
137
143
|
});
|
|
138
144
|
|
|
@@ -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": "2025.1
|
|
6
|
+
"JSBundleVersion": "2025.2.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": "
|
|
14
|
+
"GitRevision": "35aee1b170bca21048d178ff93b39a1b48885bda"
|
|
15
15
|
},
|
|
16
16
|
"Resources": [
|
|
17
17
|
{
|
|
@@ -43,6 +43,8 @@
|
|
|
43
43
|
"JSFormFieldMap.js",
|
|
44
44
|
"JSURL.js",
|
|
45
45
|
"JSMIMEHeaderMap.js",
|
|
46
|
+
"JSIterativeHash.js",
|
|
47
|
+
"JSSHA1Hash.js",
|
|
46
48
|
"JSURLRequest.js",
|
|
47
49
|
"JSURLSession.js",
|
|
48
50
|
"JSURLResponse.js",
|
|
@@ -99,8 +101,6 @@
|
|
|
99
101
|
"JSDiff.js",
|
|
100
102
|
"JSCRC32.js",
|
|
101
103
|
"JSZip.js",
|
|
102
|
-
"JSIterativeHash.js",
|
|
103
|
-
"JSSHA1Hash.js",
|
|
104
104
|
"JSMD5Hash.js",
|
|
105
105
|
"JSArguments.js",
|
|
106
106
|
"JSEnvironment.js",
|
|
@@ -122,9 +122,9 @@
|
|
|
122
122
|
"setTimeout",
|
|
123
123
|
"setInterval",
|
|
124
124
|
"Intl",
|
|
125
|
-
"Uint32Array",
|
|
126
125
|
"ArrayBuffer",
|
|
127
|
-
"Uint8Array"
|
|
126
|
+
"Uint8Array",
|
|
127
|
+
"Uint32Array"
|
|
128
128
|
],
|
|
129
129
|
"globals": [
|
|
130
130
|
"JSCopy",
|
|
@@ -187,6 +187,8 @@
|
|
|
187
187
|
"JSURL",
|
|
188
188
|
"JSMIMEHeaderMap",
|
|
189
189
|
"JSMIMEHeader",
|
|
190
|
+
"JSIterativeHash",
|
|
191
|
+
"JSSHA1Hash",
|
|
190
192
|
"JSURLRequest",
|
|
191
193
|
"JSURLSession",
|
|
192
194
|
"JSURLResponse",
|
|
@@ -268,8 +270,6 @@
|
|
|
268
270
|
"JSDiff",
|
|
269
271
|
"JSCRC32",
|
|
270
272
|
"JSZip",
|
|
271
|
-
"JSIterativeHash",
|
|
272
|
-
"JSSHA1Hash",
|
|
273
273
|
"JSMD5Hash",
|
|
274
274
|
"JSArguments",
|
|
275
275
|
"JSEnvironment"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.SecurityKit",
|
|
4
|
-
"JSBundleVersion": "2025.1
|
|
4
|
+
"JSBundleVersion": "2025.2.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": "
|
|
12
|
+
"GitRevision": "35aee1b170bca21048d178ff93b39a1b48885bda"
|
|
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": "2025.1
|
|
6
|
+
"JSBundleVersion": "2025.2.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": "
|
|
14
|
+
"GitRevision": "35aee1b170bca21048d178ff93b39a1b48885bda"
|
|
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": "2025.1
|
|
4
|
+
"JSBundleVersion": "2025.2.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": "
|
|
11
|
+
"GitRevision": "35aee1b170bca21048d178ff93b39a1b48885bda"
|
|
12
12
|
}
|
package/Node/Printer.js
CHANGED
|
@@ -36,33 +36,42 @@ JSClass("Printer", JSObject, {
|
|
|
36
36
|
if (this.quiet && !always){
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
|
-
if (this.statusMessage !== null){
|
|
40
|
-
this._erase(this.statusMessage.length);
|
|
41
|
-
}
|
|
42
39
|
var prefix = "[%s] ".sprintf(this.label);
|
|
43
40
|
var line = prefix + message;
|
|
44
|
-
this.
|
|
45
|
-
|
|
41
|
+
if (this.stream.isTTY){
|
|
42
|
+
if (this.statusMessage !== null){
|
|
43
|
+
this._erase(this.statusMessage.length);
|
|
44
|
+
}
|
|
45
|
+
this.statusMessage = line.utf8();
|
|
46
|
+
this._printRawData(this.statusMessage);
|
|
47
|
+
}else{
|
|
48
|
+
line += "\n";
|
|
49
|
+
this._printRawData(line.utf8());
|
|
50
|
+
}
|
|
46
51
|
},
|
|
47
52
|
|
|
48
53
|
print: function(message, reprintStatus=false, overwriteStatus=false){
|
|
49
54
|
// if (overwriteStatus){
|
|
50
55
|
// reprintStatus = true;
|
|
51
56
|
// }
|
|
52
|
-
if (
|
|
53
|
-
this.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
if (this.stream.isTTY){
|
|
58
|
+
if (!overwriteStatus && this.statusMessage.length > 0){
|
|
59
|
+
this._printRawData("\n".utf8());
|
|
60
|
+
}
|
|
61
|
+
if (overwriteStatus){
|
|
62
|
+
this._erase(this.statusMessage.length);
|
|
63
|
+
}
|
|
57
64
|
}
|
|
58
65
|
this._printRawData(message.utf8());
|
|
59
|
-
if (
|
|
60
|
-
if (
|
|
61
|
-
|
|
66
|
+
if (this.stream.isTTY){
|
|
67
|
+
if (reprintStatus){
|
|
68
|
+
if (message.length > 0 && !message.endsWith("\n")){
|
|
69
|
+
this._printRawData("\n".utf8());
|
|
70
|
+
}
|
|
71
|
+
this._printRawData(this.statusMessage);
|
|
72
|
+
}else{
|
|
73
|
+
this.statusMessage = JSData.initWithLength(0);
|
|
62
74
|
}
|
|
63
|
-
this._printRawData(this.statusMessage);
|
|
64
|
-
}else{
|
|
65
|
-
this.statusMessage = JSData.initWithLength(0);
|
|
66
75
|
}
|
|
67
76
|
},
|
|
68
77
|
|
|
@@ -3,14 +3,14 @@ JSBundle.bundles['io.breakside.jskit'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "node",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.jskit",
|
|
6
|
-
"JSBundleVersion": "2025.1
|
|
6
|
+
"JSBundleVersion": "2025.2.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": "
|
|
13
|
+
"GitRevision": "35aee1b170bca21048d178ff93b39a1b48885bda"
|
|
14
14
|
},
|
|
15
15
|
"Resources": [
|
|
16
16
|
{
|
package/Node/jskit
CHANGED
|
@@ -44,6 +44,8 @@ require("./../Frameworks/Foundation.jsframework/JS/JSBundle.js");
|
|
|
44
44
|
require("./../Frameworks/Foundation.jsframework/JS/JSFormFieldMap.js");
|
|
45
45
|
require("./../Frameworks/Foundation.jsframework/JS/JSURL.js");
|
|
46
46
|
require("./../Frameworks/Foundation.jsframework/JS/JSMIMEHeaderMap.js");
|
|
47
|
+
require("./../Frameworks/Foundation.jsframework/JS/JSIterativeHash.js");
|
|
48
|
+
require("./../Frameworks/Foundation.jsframework/JS/JSSHA1Hash.js");
|
|
47
49
|
require("./../Frameworks/Foundation.jsframework/JS/JSURLRequest.js");
|
|
48
50
|
require("./../Frameworks/Foundation.jsframework/JS/JSURLSession.js");
|
|
49
51
|
require("./../Frameworks/Foundation.jsframework/JS/JSURLResponse.js");
|
|
@@ -100,8 +102,6 @@ require("./../Frameworks/Foundation.jsframework/JS/JSSynchronizer.js");
|
|
|
100
102
|
require("./../Frameworks/Foundation.jsframework/JS/JSDiff.js");
|
|
101
103
|
require("./../Frameworks/Foundation.jsframework/JS/JSCRC32.js");
|
|
102
104
|
require("./../Frameworks/Foundation.jsframework/JS/JSZip.js");
|
|
103
|
-
require("./../Frameworks/Foundation.jsframework/JS/JSIterativeHash.js");
|
|
104
|
-
require("./../Frameworks/Foundation.jsframework/JS/JSSHA1Hash.js");
|
|
105
105
|
require("./../Frameworks/Foundation.jsframework/JS/JSMD5Hash.js");
|
|
106
106
|
require("./../Frameworks/Foundation.jsframework/JS/JSArguments.js");
|
|
107
107
|
require("./../Frameworks/Foundation.jsframework/JS/JSEnvironment.js");
|
|
@@ -50,6 +50,23 @@ JSLogBuffer.prototype = {
|
|
|
50
50
|
return this.array.slice(0, this.length);
|
|
51
51
|
}
|
|
52
52
|
return this.array.slice(this.writeIndex).concat(this.array.slice(0, this.writeIndex));
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
read: function(recordIndex){
|
|
56
|
+
if (recordIndex < 0){
|
|
57
|
+
recordIndex = this.length + recordIndex;
|
|
58
|
+
}
|
|
59
|
+
if (recordIndex < 0){
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
if (recordIndex >= this.length){
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
if (this.length < this.capacity){
|
|
66
|
+
return this.array[recordIndex];
|
|
67
|
+
}
|
|
68
|
+
var index = (this.writeIndex + this.capacity + recordIndex) % this.capacity;
|
|
69
|
+
return this.array[index];
|
|
53
70
|
}
|
|
54
71
|
};
|
|
55
72
|
|
|
@@ -81,7 +98,8 @@ var defaultConfiguration = {
|
|
|
81
98
|
print: true,
|
|
82
99
|
console: console,
|
|
83
100
|
handlers: null,
|
|
84
|
-
parent: null
|
|
101
|
+
parent: null,
|
|
102
|
+
suppressDuplicates: false,
|
|
85
103
|
};
|
|
86
104
|
|
|
87
105
|
var createConfiguration = function(parent){
|
|
@@ -131,7 +149,7 @@ JSLog.getOrCreateConfig = function(subsystem, category){
|
|
|
131
149
|
JSLog.configure = function(configuration, level, subsystem, category){
|
|
132
150
|
var config = JSLog.getOrCreateConfig(subsystem, category);
|
|
133
151
|
for (var property in configuration){
|
|
134
|
-
if (property === 'enabled' || property === 'print' || property === 'console'){
|
|
152
|
+
if (property === 'enabled' || property === 'print' || property === 'console' || property === "suppressDuplicates"){
|
|
135
153
|
config[level][property] = configuration[property];
|
|
136
154
|
}
|
|
137
155
|
}
|
|
@@ -189,6 +207,10 @@ JSLog.write = function(record){
|
|
|
189
207
|
JSLog.buffer.write(record);
|
|
190
208
|
};
|
|
191
209
|
|
|
210
|
+
JSLog.recordsAreEqual = function(a, b){
|
|
211
|
+
return a.subsystem === b.subsystem && a.category === b.category && a.level === b.level && a.message === b.message;
|
|
212
|
+
};
|
|
213
|
+
|
|
192
214
|
JSLog.getRecords = function(){
|
|
193
215
|
return this.buffer.readAll();
|
|
194
216
|
};
|
|
@@ -308,6 +330,14 @@ JSLog.prototype = {
|
|
|
308
330
|
}
|
|
309
331
|
}
|
|
310
332
|
}
|
|
333
|
+
if (config.suppressDuplicates){
|
|
334
|
+
var previous = JSLog.buffer.read(-1);
|
|
335
|
+
if (previous !== null && JSLog.recordsAreEqual(previous, record)){
|
|
336
|
+
if (record.timestamp - previous.timestamp < 5){
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
311
341
|
JSLog.write(record);
|
|
312
342
|
if (config.print){
|
|
313
343
|
config.console[record.level](JSLog.format(record) + JSLog.formatStacktrace(record));
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
// #import "JSURL.js"
|
|
18
18
|
// #import "JSMIMEHeaderMap.js"
|
|
19
19
|
// #import "JSMediaType.js"
|
|
20
|
+
// #import "UUID.js"
|
|
21
|
+
// #import "JSSHA1Hash.js"
|
|
20
22
|
'use strict';
|
|
21
23
|
|
|
22
24
|
JSClass("JSURLRequest", JSObject, {
|
|
@@ -132,7 +134,11 @@ JSClass("JSURLRequest", JSObject, {
|
|
|
132
134
|
return;
|
|
133
135
|
}
|
|
134
136
|
this.headerMap.add("Authorization", "Bearer " + token);
|
|
135
|
-
}
|
|
137
|
+
},
|
|
138
|
+
|
|
139
|
+
uniqueIdentifier: JSLazyInitProperty(function(){
|
|
140
|
+
return JSSHA1Hash(UUID.init().bytes).hexStringRepresentation();
|
|
141
|
+
})
|
|
136
142
|
|
|
137
143
|
});
|
|
138
144
|
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
var shared = null;
|
|
26
26
|
|
|
27
27
|
var logger = JSLog("uikit", "application");
|
|
28
|
+
var actionLogger = JSLog("uikit", "actions");
|
|
28
29
|
|
|
29
30
|
JSClass('UIApplication', UIResponder, {
|
|
30
31
|
|
|
@@ -42,6 +43,8 @@ JSClass('UIApplication', UIResponder, {
|
|
|
42
43
|
}else if (this.bundle.info.UIUserInterfaceStyle === "dark"){
|
|
43
44
|
this.windowServer.lightModeEnabled = false;
|
|
44
45
|
}
|
|
46
|
+
JSLog.configure({enabled: false, print: false, suppressDuplicates: true}, JSLog.Level.debug, "uikit", "actions");
|
|
47
|
+
JSLog.configure({enabled: true, print: false}, JSLog.Level.debug, "uikit", "vclife");
|
|
45
48
|
this._windows = [];
|
|
46
49
|
this.windowServer.postNotificationForAccessibilityElement(UIAccessibility.Notification.elementCreated, this);
|
|
47
50
|
},
|
|
@@ -422,6 +425,11 @@ JSClass('UIApplication', UIResponder, {
|
|
|
422
425
|
if (target === null){
|
|
423
426
|
target = undefined;
|
|
424
427
|
}
|
|
428
|
+
if (target instanceof JSObject){
|
|
429
|
+
actionLogger.debug("sendAction " + (action.name || ("anonymousfn")) + " to %{public}#%d from %{public}#%d", target.$class.className, target.objetID, sender.$class.className, sender.objectID);
|
|
430
|
+
}else{
|
|
431
|
+
actionLogger.debug("sendAction " + (action.name || ("anonymousfn")) + " from %{public}#%d", sender.$class.className, sender.objectID);
|
|
432
|
+
}
|
|
425
433
|
action.call(target, sender, event);
|
|
426
434
|
}else{
|
|
427
435
|
if (target === undefined){
|
|
@@ -429,6 +437,7 @@ JSClass('UIApplication', UIResponder, {
|
|
|
429
437
|
}
|
|
430
438
|
target = this.firstTargetForAction(action, target, sender);
|
|
431
439
|
if (target !== null){
|
|
440
|
+
actionLogger.debug("sendAction " + action + " to %{public}#%d from %{public}#%d", target.$class.className, target.objectID, sender.$class.className, sender.objectID);
|
|
432
441
|
target[action](sender, event);
|
|
433
442
|
}
|
|
434
443
|
}
|
|
@@ -19,6 +19,11 @@
|
|
|
19
19
|
/* global UINavigationItem, UINavigationController, UIApplication */
|
|
20
20
|
'use strict';
|
|
21
21
|
|
|
22
|
+
(function(){
|
|
23
|
+
|
|
24
|
+
var logger = JSLog("uikit", "vc");
|
|
25
|
+
var lifecycleLogger = JSLog("uikit", "vclife");
|
|
26
|
+
|
|
22
27
|
JSClass("UIViewController", UIResponder, {
|
|
23
28
|
|
|
24
29
|
// -------------------------------------------------------------------------
|
|
@@ -110,16 +115,19 @@ JSClass("UIViewController", UIResponder, {
|
|
|
110
115
|
|
|
111
116
|
viewWillAppear: function(animated){
|
|
112
117
|
this._lifecycleState = UIViewController.LifecycleState.appearing;
|
|
118
|
+
lifecycleLogger.debug("viewWillAppear %{public}#%d animated:%b", this.$class.className, this.objectID, animated);
|
|
113
119
|
this._loadViewIfNeeded();
|
|
114
120
|
},
|
|
115
121
|
|
|
116
122
|
viewDidAppear: function(animated){
|
|
117
123
|
this._lifecycleState = UIViewController.LifecycleState.appeared;
|
|
124
|
+
lifecycleLogger.debug("viewDidAppear %{public}#%d animated:%b", this.$class.className, this.objectID, animated);
|
|
118
125
|
this._isViewVisible = true;
|
|
119
126
|
},
|
|
120
127
|
|
|
121
128
|
viewWillDisappear: function(animated){
|
|
122
129
|
this._lifecycleState = UIViewController.LifecycleState.disappearing;
|
|
130
|
+
lifecycleLogger.debug("viewWillDisappear %{public}#%d animated:%b", this.$class.className, this.objectID, animated);
|
|
123
131
|
if (this.isViewLoaded){
|
|
124
132
|
var window = this.view.window;
|
|
125
133
|
if (window !== null){
|
|
@@ -139,6 +147,7 @@ JSClass("UIViewController", UIResponder, {
|
|
|
139
147
|
|
|
140
148
|
viewDidDisappear: function(animated){
|
|
141
149
|
this._lifecycleState = UIViewController.LifecycleState.disappeared;
|
|
150
|
+
lifecycleLogger.debug("viewDidDisappear %{public}#%d animated:%b", this.$class.className, this.objectID, animated);
|
|
142
151
|
this._isViewVisible = false;
|
|
143
152
|
},
|
|
144
153
|
|
|
@@ -424,4 +433,6 @@ UIViewController.LifecycleState = {
|
|
|
424
433
|
appearing: 1,
|
|
425
434
|
appeared: 2,
|
|
426
435
|
disappearing: 3
|
|
427
|
-
};
|
|
436
|
+
};
|
|
437
|
+
|
|
438
|
+
})();
|